From kaitlin at linux.vnet.ibm.com Sat Dec 1 00:17:13 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Nov 2007 16:17:13 -0800 Subject: [Libvirt-cim] [PATCH] ELEC cleanup - remove get_fq_devid() Message-ID: <069db51711b508916780.1196468233@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1196468209 28800 # Node ID 069db51711b5089167809cecc193b700aa2c6814 # Parent 075b7c91e9729f9705af3a2f4726e6883be29b59 ELEC cleanup - remove get_fq_devid(). Removing get_fq_devid() since it's not necessary for building an InstanceID. Since this change causes error1 to be removed, I also renamed error2 to out, which conforms to the style of the other of the providers. Also, having an error2 without an error1 seemed silly. Signed-off-by: Kaitlin Rupert diff -r 075b7c91e972 -r 069db51711b5 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 14:16:17 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 16:16:49 2007 -0800 @@ -30,7 +30,6 @@ #include "std_instance.h" #include "misc_util.h" -#include "device_parsing.h" #include "cs_util.h" #include "Virt_EnabledLogicalElementCapabilities.h" @@ -58,24 +57,15 @@ static CMPIStatus set_inst_properties(co CMPIArray *array; uint16_t element; int edit_name = 0; - char *devid; CMSetProperty(inst, "CreationClassName", (CMPIValue *)classname, CMPI_chars); - devid = get_fq_devid((char *)sys_name, "0"); - if (devid == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get full ID"); - goto error1; - } - - CMSetProperty(inst, "InstanceID", (CMPIValue *)devid, CMPI_chars); + CMSetProperty(inst, "InstanceID", (CMPIValue *)sys_name, CMPI_chars); array = CMNewArray(broker, 5, CMPI_uint16, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(array)) - goto error2; + goto out; element = (uint16_t)ENABLED; CMSetArrayElementAt(array, 0, &element, CMPI_uint16); @@ -97,9 +87,7 @@ static CMPIStatus set_inst_properties(co CMSetProperty(inst, "ElementNameEditSupported", (CMPIValue *)&edit_name, CMPI_boolean); - error2: - free(devid); - error1: + out: return s; } From kaitlin at linux.vnet.ibm.com Sat Dec 1 00:09:17 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Nov 2007 16:09:17 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Fix (again) VSMCaps and ElementCaps In-Reply-To: References: Message-ID: <4750A62D.1050400@linux.vnet.ibm.com> Dan Smith wrote: > There was a lot of cruft in both VSMCaps and ElementCaps around generating > a dynamic InstanceID with the HostSystem.Name in it that is really not > necessary. > > This set just changes to a static InstanceID for VSMCaps and removes all > the supporting code that it obviates. > > Changes: > - Just a rebase on tip > Excellent - this one applied for me. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Sat Dec 1 00:16:38 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 30 Nov 2007 16:16:38 -0800 Subject: [Libvirt-cim] [PATCH] ELEC cleanup - remove get_fq_devid() In-Reply-To: <069db51711b508916780.1196468233@elm3b41.beaverton.ibm.com> (Kaitlin Rupert's message of "Fri, 30 Nov 2007 16:17:13 -0800") References: <069db51711b508916780.1196468233@elm3b41.beaverton.ibm.com> Message-ID: <87abov5kwp.fsf@theine.beaverton.ibm.com> KR> # HG changeset patch KR> # User Kaitlin Rupert KR> # Date 1196468209 28800 KR> # Node ID 069db51711b5089167809cecc193b700aa2c6814 KR> # Parent 075b7c91e9729f9705af3a2f4726e6883be29b59 KR> ELEC cleanup - remove get_fq_devid(). KR> Removing get_fq_devid() since it's not necessary for building an KR> InstanceID. Since this change causes error1 to be removed, I also KR> renamed error2 to out, which conforms to the style of the other of KR> the providers. Also, having an error2 without an error1 seemed KR> silly. Yep, all good things. However, doesn't Virt_ElementCapabilities.c:cap_to_sys() need to change to no longer expecting to parse the devid-style InstanceID? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Sat Dec 1 00:26:44 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Nov 2007 16:26:44 -0800 Subject: [Libvirt-cim] [PATCH] ELEC cleanup - remove get_fq_devid() In-Reply-To: <87abov5kwp.fsf@theine.beaverton.ibm.com> References: <069db51711b508916780.1196468233@elm3b41.beaverton.ibm.com> <87abov5kwp.fsf@theine.beaverton.ibm.com> Message-ID: <4750AA44.3090201@linux.vnet.ibm.com> Dan Smith wrote: > Yep, all good things. > > However, doesn't Virt_ElementCapabilities.c:cap_to_sys() need to > change to no longer expecting to parse the devid-style InstanceID? > > No, your recent patch removed that functionality. cap_to_sys() is now a more generic function - it doesn't do any kind of checking, it just returns a HostSystem instance. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Sat Dec 1 00:29:46 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 30 Nov 2007 16:29:46 -0800 Subject: [Libvirt-cim] [PATCH] ELEC cleanup - remove get_fq_devid() In-Reply-To: <4750AA44.3090201@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Fri, 30 Nov 2007 16:26:44 -0800") References: <069db51711b508916780.1196468233@elm3b41.beaverton.ibm.com> <87abov5kwp.fsf@theine.beaverton.ibm.com> <4750AA44.3090201@linux.vnet.ibm.com> Message-ID: <871wa75kat.fsf@theine.beaverton.ibm.com> KR> No, your recent patch removed that functionality. cap_to_sys() is KR> now a more generic function - it doesn't do any kind of checking, KR> it just returns a HostSystem instance. Sorry, yes, I meant cap_to_cs() :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Sat Dec 1 01:10:20 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Nov 2007 17:10:20 -0800 Subject: [Libvirt-cim] [PATCH] ELEC cleanup - remove get_fq_devid() In-Reply-To: <871wa75kat.fsf@theine.beaverton.ibm.com> References: <069db51711b508916780.1196468233@elm3b41.beaverton.ibm.com> <87abov5kwp.fsf@theine.beaverton.ibm.com> <4750AA44.3090201@linux.vnet.ibm.com> <871wa75kat.fsf@theine.beaverton.ibm.com> Message-ID: <4750B47C.4010907@linux.vnet.ibm.com> Dan Smith wrote: > KR> No, your recent patch removed that functionality. cap_to_sys() is > KR> now a more generic function - it doesn't do any kind of checking, > KR> it just returns a HostSystem instance. > > Sorry, yes, I meant cap_to_cs() :) > Yep, you're right. I must have made a mistake when I unit tested, because my queries to EC passed before I submitted. Oops. Will send a patch set. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Sat Dec 1 01:22:20 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Nov 2007 17:22:20 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Remove devid-style InstanceID support from ELEC and EC. Message-ID: Removed devid-style InstanceID support from ELEC - this class now uses just the name of domain. This caused a needed update in EC - cap_to_cs() no longer needs to parse devid-style InstanceIDs. From kaitlin at linux.vnet.ibm.com Sat Dec 1 01:22:22 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Nov 2007 17:22:22 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Removing support for devid-style InstanceID from EC In-Reply-To: Message-ID: <23e70ea23f1a9d8fd59e.1196472142@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1196472093 28800 # Node ID 23e70ea23f1a9d8fd59ed0980b077a014da8eb8b # Parent e69c02e79e40056b1d1a4825c048d70355e9cf85 Removing support for devid-style InstanceID from EC. Since ELEC no longer uses devid-style InstanceID, we need to remove the devid-parsing from cap_to_cs(). Signed-off-by: Kaitlin Rupert diff -r e69c02e79e40 -r 23e70ea23f1a src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Fri Nov 30 16:54:45 2007 -0800 +++ b/src/Virt_ElementCapabilities.c Fri Nov 30 17:21:33 2007 -0800 @@ -31,7 +31,6 @@ #include "libcmpiutil.h" #include "misc_util.h" #include "std_association.h" -#include "device_parsing.h" #include "Virt_VirtualSystemManagementCapabilities.h" #include "Virt_EnabledLogicalElementCapabilities.h" @@ -119,8 +118,6 @@ static CMPIStatus cap_to_cs(const CMPIOb struct inst_list *list) { const char *inst_id; - char *host; - char *device; CMPIInstance *inst; virConnectPtr conn; CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -129,13 +126,6 @@ static CMPIStatus cap_to_cs(const CMPIOb cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Could not get InstanceID"); - goto error1; - } - - if (!parse_fq_devid(inst_id, &host, &device)) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Could not get system name"); goto error1; } @@ -143,14 +133,12 @@ static CMPIStatus cap_to_cs(const CMPIOb if (s.rc != CMPI_RC_OK) goto error1; - inst = instance_from_name(_BROKER, conn, host, ref); + inst = instance_from_name(_BROKER, conn, inst_id, ref); if (inst) inst_list_add(list, inst); virConnectClose(conn); error1: - free(host); - free(device); return s; } From kaitlin at linux.vnet.ibm.com Sat Dec 1 01:22:21 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Nov 2007 17:22:21 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] ELEC cleanup - remove get_fq_devid() In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1196470485 28800 # Node ID e69c02e79e40056b1d1a4825c048d70355e9cf85 # Parent e6be7823c8e90c1f4b722ce1b33d6d15db123029 ELEC cleanup - remove get_fq_devid(). Removing get_fq_devid() since it's not necessary for building an InstanceID. Since this change causes error1 to be removed, I also renamed error2 to out, which conforms to the style of the other of the providers. Also, having an error2 without an error1 seemed silly. Signed-off-by: Kaitlin Rupert diff -r e6be7823c8e9 -r e69c02e79e40 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 15:32:26 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 16:54:45 2007 -0800 @@ -30,7 +30,6 @@ #include "std_instance.h" #include "misc_util.h" -#include "device_parsing.h" #include "cs_util.h" #include "Virt_EnabledLogicalElementCapabilities.h" @@ -58,24 +57,15 @@ static CMPIStatus set_inst_properties(co CMPIArray *array; uint16_t element; int edit_name = 0; - char *devid; CMSetProperty(inst, "CreationClassName", (CMPIValue *)classname, CMPI_chars); - devid = get_fq_devid((char *)sys_name, "0"); - if (devid == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get full ID"); - goto error1; - } - - CMSetProperty(inst, "InstanceID", (CMPIValue *)devid, CMPI_chars); + CMSetProperty(inst, "InstanceID", (CMPIValue *)sys_name, CMPI_chars); array = CMNewArray(broker, 5, CMPI_uint16, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(array)) - goto error2; + goto out; element = (uint16_t)ENABLED; CMSetArrayElementAt(array, 0, &element, CMPI_uint16); @@ -97,9 +87,7 @@ static CMPIStatus set_inst_properties(co CMSetProperty(inst, "ElementNameEditSupported", (CMPIValue *)&edit_name, CMPI_boolean); - error2: - free(devid); - error1: + out: return s; } From heidieck at linux.vnet.ibm.com Mon Dec 3 08:53:43 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 09:53:43 +0100 Subject: [Libvirt-cim] [PATCH] ESD does not support specific result clases properly In-Reply-To: <6515e4a1c90bba936fa1.1196448753@elm3b41.beaverton.ibm.com> References: <6515e4a1c90bba936fa1.1196448753@elm3b41.beaverton.ibm.com> Message-ID: <4753C417.6080408@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1196448217 28800 > # Node ID 6515e4a1c90bba936fa1a15ddf2f501491e16fb5 > # Parent a10df58ddd0ed7f8e905ce21a28a5e585fd304ff > ESD does not support specific result clases properly. > > Specifying a result class of Xen_VirtualSystemSettingData does not work (see query below), however a result class of CIM_ManagedElement does work. > > This is because I tried to make this provider accept both generic and specific result classes. Heidi's libcmpiutil API update makes it so that the providers don't need to be concerned with handling more generic cases (CIM_ManagedElement, CIM_VirtualSystemSettingData, etc). > > Also, I missed this during Heidi's patch review - instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported. See below for failing query. > > Failing queries: > wbemcli ain -ac Xen_ElementSettingData -arc Xen_VirtualSystemSettingData 'http://root:elm3b41 at localhost/root/virt:Xen_VirtualSystemSettingData.InstanceID="Xen:Domain-0"' > > wbemcli ain -ac Xen_ElementSettingData -arc Xen_ProcResourceAllocationSettingData 'http://root:elm3b41 at localhost/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/3"' > > Great Kaitlin :). You got me. When changing this association, I was really confused about the given references, but forgot to add this comment to the mail. This makes it now clear, how the association works :). Good work ! -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 3 08:54:36 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 09:54:36 +0100 Subject: [Libvirt-cim] [PATCH] SDC doesn't support specific RASD classes In-Reply-To: References: Message-ID: <4753C44C.6040301@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1196451201 28800 > # Node ID d5af3e219c22e8b32de64c69a29aea970ab6a9a4 > # Parent 6515e4a1c90bba936fa1a15ddf2f501491e16fb5 > SDC doesn't support specific RASD classes. > > Instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported. > Great :) ! > I also missed this one while reviewing Heidi's patches. Me too :( ... ooops. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 3 09:21:47 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 10:21:47 +0100 Subject: [Libvirt-cim] [PATCH] SD doesn't return instances in all cases In-Reply-To: <874pf374rv.fsf@theine.beaverton.ibm.com> References: <1776beb36f5cffcfad4e.1196461268@elm3b41.beaverton.ibm.com> <874pf374rv.fsf@theine.beaverton.ibm.com> Message-ID: <4753CAAB.4050509@linux.vnet.ibm.com> Good catch Kaitlin :). Dan Smith wrote: > KR> I think all of this can be removed because filter_results() in > KR> libcmpiutil should remove the need for this kind of checking. > > Yeah, which is really handy. > > I can see this becoming an issue later strictly for performance, but I > think that this is fine for now and we can reintroduce the > optimization (correctly) if we decide it's needed. Now, that you both pick up the filter_results() function, this is a good time to enter this discussion. I agree that the filter_results() function is handy and takes away a lot of checking and distinguishing from the provider. For tiny numbers of returned instances and fast systems, this will not cause any problems. But we should keep in mind, that the providers should also scale for a large number of virtual machines. As Dan already mentioned - this approach will become an performance issue later. On the other hand its more the responsibility of the provider - especially for our ones, that handle a lot of subclasses at one time - to filter the returned instances, as the responsibility of the generic association logic. So I want to follow Dan's opinion and keep it for now. But we should add this to our ToDo list and fix as time allows. I suppose this will mean to reorganize the providers a bit and I do not expect a huge effort. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From yunguol at cn.ibm.com Mon Dec 3 09:30:39 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 3 Dec 2007 17:30:39 +0800 Subject: [Libvirt-cim] Failing qurey of VirtualSystemManagementCapabilities in Pegasus Message-ID: Hi, I try to test VirtualSystemManagementCapabilities and get results as follows: Failing queries in Pegasus: wbemein http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities The return results list below, and that make tog-pegasus stop. * * wbemein: Http Exception: server returned nothing (no headers, no data) * However, I can get expected results in sfcb. wbemein http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities localhost:5988/root/virt:Xen_VirtualSystemManagementCapabilities.InstanceID="zeit/0" Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From daisy at linux.vnet.ibm.com Mon Dec 3 09:36:00 2007 From: daisy at linux.vnet.ibm.com (daisy) Date: Mon, 03 Dec 2007 17:36:00 +0800 Subject: [Libvirt-cim] Failing qurey of VirtualSystemManagementCapabilities in Pegasus Message-ID: <4753CE00.8010001@linux.vnet.ibm.com> Hi, I try to test VirtualSystemManagementCapabilities and get results as follows: Failing queries in Pegasus: wbemein http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities The return results list below, and that make tog-pegasus stop. * * wbemein: Http Exception: server returned nothing (no headers, no data) * However, I can get expected results in sfcb. wbemein http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities localhost:5988/root/virt:Xen_VirtualSystemManagementCapabilities.InstanceID="zeit/0" Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 From daisy at linux.vnet.ibm.com Mon Dec 3 09:42:17 2007 From: daisy at linux.vnet.ibm.com (daisy) Date: Mon, 03 Dec 2007 17:42:17 +0800 Subject: [Libvirt-cim] Failing qurey of EnabledLogicalElementCapabilities in Pegasus Message-ID: <4753CF79.40104@linux.vnet.ibm.com> Hi, I try to test EnabledLogicalElementCapabilities and get results as follows: Failing queries in Pegasus: wbemein http://root:password at localhost/root/virt:Xen_EnabledLogicalElementCapabilities * * wbemein: Http Exception: server returned nothing (no headers, no data) * However, I can get expected results in sfcb. wbemein http://root:password at localhost/root/virt:Xen_EnabledLogicalElementCapabilities localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities.InstanceID="Domain-0/0" Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 From heidieck at linux.vnet.ibm.com Mon Dec 3 10:13:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 11:13:03 +0100 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Fix (again) VSMCaps and ElementCaps In-Reply-To: <4750A62D.1050400@linux.vnet.ibm.com> References: <4750A62D.1050400@linux.vnet.ibm.com> Message-ID: <4753D6AF.8050005@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Dan Smith wrote: >> There was a lot of cruft in both VSMCaps and ElementCaps around >> generating >> a dynamic InstanceID with the HostSystem.Name in it that is really not >> necessary. >> >> This set just changes to a static InstanceID for VSMCaps and removes all >> the supporting code that it obviates. >> >> Changes: >> - Just a rebase on tip >> > Excellent - this one applied for me. +1 > works for me too. +1 -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 3 10:23:26 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 11:23:26 +0100 Subject: [Libvirt-cim] [PATCH 0 of 2] Remove devid-style InstanceID support from ELEC and EC. In-Reply-To: References: Message-ID: <4753D91E.5010902@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Removed devid-style InstanceID support from ELEC - this class now uses just the name of domain. > > This caused a needed update in EC - cap_to_cs() no longer needs to parse devid-style InstanceIDs. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > works for me ... +1 -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 3 10:26:00 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 11:26:00 +0100 Subject: [Libvirt-cim] Failing qurey of VirtualSystemManagementCapabilities in Pegasus In-Reply-To: References: Message-ID: <4753D9B8.8040100@linux.vnet.ibm.com> Guo Lian Yun wrote: > > Hi, > > I try to test VirtualSystemManagementCapabilities and get results as > follows: > > Failing queries in Pegasus: > > wbemein > http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities > > The return results list below, and that make tog-pegasus stop. > * > * wbemein: Http Exception: server returned nothing (no headers, no data) > * > > However, I can get expected results in sfcb. > > wbemein > http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities > > localhost:5988/root/virt:Xen_VirtualSystemManagementCapabilities.InstanceID="zeit/0" > Please check, if you have installed the latest libcmpiutil and libvirt-cim libraries for Pegasus. I have tested in my system and it works. If you have installed sfcb and Pegasus on one machine, configures takes sfcb per default. You need to ./configure CIMSERVER=pegasus, make clean, make ... to compile and install for Pegasus. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 3 11:48:05 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 12:48:05 +0100 Subject: [Libvirt-cim] [PATCH 0 of 2] Remove devid-style InstanceID support from ELEC and EC. In-Reply-To: References: Message-ID: <4753ECF5.2030502@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Removed devid-style InstanceID support from ELEC - this class now uses just the name of domain. > > This caused a needed update in EC - cap_to_cs() no longer needs to parse devid-style InstanceIDs. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > There seems to be something broken by the last patch set series (applied the two from Dan, followed by the two from Kaitlin). Before applying patch set: wbemein http://localhost/root/virt:CIM_EnabledLogicalElementCapabilities localhost:5988/root/virt:KVM_VirtualSystemManagementCapabilities.InstanceID="localhost.localdomain/0" localhost:5988/root/virt:KVM_EnabledLogicalElementCapabilities.InstanceID="qemu1/0" After applying patch set: wbemein http://localhost/root/virt:CIM_EnabledLogicalElementCapabilities localhost:5988/root/virt:KVM_VirtualSystemManagementCapabilities.InstanceID="ManagementCapabilities" localhost:5988/root/virt:Xen_VirtualSystemManagementCapabilities.InstanceID="ManagementCapabilities" localhost:5988/root/virt:KVM_EnabledLogicalElementCapabilities.InstanceID="qemu1" The instance of Xen_VirtualSystemManagementCapabilities is wrong. I had a look into the code and think this could be easily fixed by starting return_vsm_cap() with an connect_by_classname(). Kaitlin, please can you incorporate that fix into your patch set ? Thanks. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 3 11:37:02 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:37:02 +0200 Subject: [Libvirt-cim] [PATCH 5 of 9] RAFP: Provider registered per subclass In-Reply-To: Message-ID: <9fac31df90d1ce6279af.1196685422@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196685311 -3600 # Node ID 9fac31df90d1ce6279aff869ad9da51b411223e9 # Parent 495e8bdd4e1415b253fd64f0527760ad11b75580 RAFP: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r 495e8bdd4e14 -r 9fac31df90d1 schema/ResourceAllocationFromPool.registration --- a/schema/ResourceAllocationFromPool.registration Mon Dec 03 13:35:10 2007 +0100 +++ b/schema/ResourceAllocationFromPool.registration Mon Dec 03 13:35:11 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourceAllocationFromPool root/virt Xen_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association -KVM_ResourceAllocationFromPool root/virt KVM_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association \ No newline at end of file +Xen_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association +KVM_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association \ No newline at end of file diff -r 495e8bdd4e14 -r 9fac31df90d1 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Mon Dec 03 13:35:10 2007 +0100 +++ b/src/Virt_ResourceAllocationFromPool.c Mon Dec 03 13:35:11 2007 +0100 @@ -305,8 +305,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:36:58 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:36:58 +0200 Subject: [Libvirt-cim] [PATCH 1 of 9] EAFP: Provider registered per subclass In-Reply-To: Message-ID: <6dbbe2c148a7cc2ba74f.1196685418@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196683313 -3600 # Node ID 6dbbe2c148a7cc2ba74ffc9e3ddcf7acdc30042c # Parent 8140438a647cd53017d79b7036702fc053fe9e9c EAFP: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. wbemain -ac CIM_ElementAllocatedFromPool 'http://localhost/root/virt:KVM_Memory.DeviceID="qemu1/mem",CreationClassName="KVM_Memory",SystemName="qemu1",SystemCreationClassName=""' localhost:5988/root/virt:KVM_MemoryPool.InstanceID="MemoryPool/0" localhost:5988/root/virt:KVM_MemoryPool.InstanceID="MemoryPool/0" Signed-off-by: Heidi Eckhart diff -r 8140438a647c -r 6dbbe2c148a7 schema/ElementAllocatedFromPool.registration --- a/schema/ElementAllocatedFromPool.registration Fri Nov 30 17:21:33 2007 -0800 +++ b/schema/ElementAllocatedFromPool.registration Mon Dec 03 13:01:53 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementAllocatedFromPool root/virt Xen_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association -KVM_ElementAllocatedFromPool root/virt KVM_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association +Xen_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association +KVM_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association diff -r 8140438a647c -r 6dbbe2c148a7 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Fri Nov 30 17:21:33 2007 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Mon Dec 03 13:01:53 2007 +0100 @@ -326,8 +326,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:36:57 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:36:57 +0200 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration Message-ID: The association provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. This patch set tries to fix it. Please review. Thanks. Based on: - #2 Fix (again) VSMCaps and ElementCap - Remove devid-style InstanceID support from ELEC and EC From heidieck at linux.vnet.ibm.com Mon Dec 3 11:37:05 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:37:05 +0200 Subject: [Libvirt-cim] [PATCH 8 of 9] SD: Provider registered per subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196685313 -3600 # Node ID c6de8c296f561df41811ca04c2ea992b729cfea3 # Parent 909704b38ca4c9bfcb1121924053f26818d8316b SD: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r 909704b38ca4 -r c6de8c296f56 schema/SystemDevice.registration --- a/schema/SystemDevice.registration Mon Dec 03 13:35:12 2007 +0100 +++ b/schema/SystemDevice.registration Mon Dec 03 13:35:13 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SystemDevice root/virt Xen_SystemDeviceProvider Virt_SystemDevice association -KVM_SystemDevice root/virt KVM_SystemDeviceProvider Virt_SystemDevice association +Xen_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association +KVM_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association diff -r 909704b38ca4 -r c6de8c296f56 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Mon Dec 03 13:35:12 2007 +0100 +++ b/src/Virt_SystemDevice.c Mon Dec 03 13:35:13 2007 +0100 @@ -288,8 +288,7 @@ static struct std_assoc *assoc_handlers[ NULL }; -STDA_AssocMIStub(, Xen_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); -STDA_AssocMIStub(, KVM_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, Virt_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:36:59 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:36:59 +0200 Subject: [Libvirt-cim] [PATCH 2 of 9] EC: Provider registered per subclass In-Reply-To: Message-ID: <97209a4aec46e659a913.1196685419@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196683550 -3600 # Node ID 97209a4aec46e659a9134dc28ac19c2f43b51c7c # Parent 6dbbe2c148a7cc2ba74ffc9e3ddcf7acdc30042c EC: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r 6dbbe2c148a7 -r 97209a4aec46 schema/ElementCapabilities.registration --- a/schema/ElementCapabilities.registration Mon Dec 03 13:01:53 2007 +0100 +++ b/schema/ElementCapabilities.registration Mon Dec 03 13:05:50 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementCapabilities root/virt Xen_ElementCapabilitiesProvider Virt_ElementCapabilities association -KVM_ElementCapabilities root/virt KVM_ElementCapabilitiesProvider Virt_ElementCapabilities association +Xen_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association +KVM_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association diff -r 6dbbe2c148a7 -r 97209a4aec46 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Dec 03 13:01:53 2007 +0100 +++ b/src/Virt_ElementCapabilities.c Mon Dec 03 13:05:50 2007 +0100 @@ -359,8 +359,7 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); -STDA_AssocMIStub(, KVM_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, Virt_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* * Local Variables: * mode: C From heidieck at linux.vnet.ibm.com Mon Dec 3 11:37:00 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:37:00 +0200 Subject: [Libvirt-cim] [PATCH 3 of 9] ESD: Provider registered per subclass In-Reply-To: Message-ID: <7c6276f57a7423a8c9a8.1196685420@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196683916 -3600 # Node ID 7c6276f57a7423a8c9a88fd48a3b4b7180948fd1 # Parent 97209a4aec46e659a9134dc28ac19c2f43b51c7c ESD: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r 97209a4aec46 -r 7c6276f57a74 schema/ElementSettingData.registration --- a/schema/ElementSettingData.registration Mon Dec 03 13:05:50 2007 +0100 +++ b/schema/ElementSettingData.registration Mon Dec 03 13:11:56 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 -# Classname Namespace ProviderName ProviderModule ProviderTypes ... -Xen_ElementSettingData root/virt Xen_ElementSettingDataProvider Virt_ElementSettingData association -KVM_ElementSettingData root/virt KVM_ElementSettingDataProvider Virt_ElementSettingData association +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association +KVM_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association diff -r 97209a4aec46 -r 7c6276f57a74 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Mon Dec 03 13:05:50 2007 +0100 +++ b/src/Virt_ElementSettingData.c Mon Dec 03 13:11:56 2007 +0100 @@ -227,8 +227,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:37:01 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:37:01 +0200 Subject: [Libvirt-cim] [PATCH 4 of 9] HS: Provider registered per subclass In-Reply-To: Message-ID: <495e8bdd4e1415b253fd.1196685421@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196685310 -3600 # Node ID 495e8bdd4e1415b253fd64f0527760ad11b75580 # Parent 7c6276f57a7423a8c9a88fd48a3b4b7180948fd1 HS: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r 7c6276f57a74 -r 495e8bdd4e14 schema/HostedService.registration --- a/schema/HostedService.registration Mon Dec 03 13:11:56 2007 +0100 +++ b/schema/HostedService.registration Mon Dec 03 13:35:10 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 -# Classname Namespace ProviderName ProviderModule ProviderTypes ... -Xen_HostedService root/virt Xen_HostedServiceProvider Virt_HostedService association -KVM_HostedService root/virt KVM_HostedServiceProvider Virt_HostedService association +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association +KVM_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association diff -r 7c6276f57a74 -r 495e8bdd4e14 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Mon Dec 03 13:11:56 2007 +0100 +++ b/src/Virt_HostedService.c Mon Dec 03 13:35:10 2007 +0100 @@ -159,8 +159,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:37:06 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:37:06 +0200 Subject: [Libvirt-cim] [PATCH 9 of 9] VSSDC: Provider registered per subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196685314 -3600 # Node ID cd9afb53c5e76783d891d7bda74d1e642cf6701e # Parent c6de8c296f561df41811ca04c2ea992b729cfea3 VSSDC: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r c6de8c296f56 -r cd9afb53c5e7 schema/VSSDComponent.registration --- a/schema/VSSDComponent.registration Mon Dec 03 13:35:13 2007 +0100 +++ b/schema/VSSDComponent.registration Mon Dec 03 13:35:14 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemSettingDataComponent root/virt Xen_VSSDComponentProvider Virt_VSSDComponent association -KVM_VirtualSystemSettingDataComponent root/virt KVM_VSSDComponentProvider Virt_VSSDComponent association +Xen_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association +KVM_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association diff -r c6de8c296f56 -r cd9afb53c5e7 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Mon Dec 03 13:35:13 2007 +0100 +++ b/src/Virt_VSSDComponent.c Mon Dec 03 13:35:14 2007 +0100 @@ -230,8 +230,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:37:04 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:37:04 +0200 Subject: [Libvirt-cim] [PATCH 7 of 9] SDS: Provider registered per subclass In-Reply-To: Message-ID: <909704b38ca4c9bfcb11.1196685424@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196685312 -3600 # Node ID 909704b38ca4c9bfcb1121924053f26818d8316b # Parent 4caca9f23d36235f40a1011be956e3c8d135f77b SDS: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r 4caca9f23d36 -r 909704b38ca4 schema/SettingsDefineState.registration --- a/schema/SettingsDefineState.registration Mon Dec 03 13:35:11 2007 +0100 +++ b/schema/SettingsDefineState.registration Mon Dec 03 13:35:12 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineState root/virt Xen_SettingsDefineStateProvider Virt_SettingsDefineState association -KVM_SettingsDefineState root/virt KVM_SettingsDefineStateProvider Virt_SettingsDefineState association +Xen_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association +KVM_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association diff -r 4caca9f23d36 -r 909704b38ca4 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Mon Dec 03 13:35:11 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Mon Dec 03 13:35:12 2007 +0100 @@ -399,8 +399,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:37:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:37:03 +0200 Subject: [Libvirt-cim] [PATCH 6 of 9] SDC: Provider registered per subclass In-Reply-To: Message-ID: <4caca9f23d36235f40a1.1196685423@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196685311 -3600 # Node ID 4caca9f23d36235f40a1011be956e3c8d135f77b # Parent 9fac31df90d1ce6279aff869ad9da51b411223e9 SDC: Provider registered per subclass The provider was registered for each subclass with a different name. That caused duplicated instances as the same provider gets called twice, but has no chance to figure out for which registration. Signed-off-by: Heidi Eckhart diff -r 9fac31df90d1 -r 4caca9f23d36 schema/SettingsDefineCapabilities.registration --- a/schema/SettingsDefineCapabilities.registration Mon Dec 03 13:35:11 2007 +0100 +++ b/schema/SettingsDefineCapabilities.registration Mon Dec 03 13:35:11 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineCapabilities root/virt Xen_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association -KVM_SettingsDefineCapabilities root/virt KVM_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association +Xen_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association +KVM_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association diff -r 9fac31df90d1 -r 4caca9f23d36 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Dec 03 13:35:11 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Dec 03 13:35:11 2007 +0100 @@ -900,8 +900,7 @@ struct std_assoc *assoc_handlers[] = { }; -STDA_AssocMIStub(, Xen_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); -STDA_AssocMIStub(, KVM_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, Virt_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Mon Dec 3 11:40:33 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:40:33 +0200 Subject: [Libvirt-cim] [PATCH 2 of 2] HS: Added Association declaration to mof In-Reply-To: Message-ID: <1217a5cd073c1b49bb2b.1196685633@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196685316 -3600 # Node ID 1217a5cd073c1b49bb2b5224bedf9986672ba207 # Parent 7a5f0b76faf104aa98922194d190724950582712 HS: Added Association declaration to mof Signed-off-by: Heidi Eckhart diff -r 7a5f0b76faf1 -r 1217a5cd073c schema/HostedService.mof --- a/schema/HostedService.mof Mon Dec 03 13:35:15 2007 +0100 +++ b/schema/HostedService.mof Mon Dec 03 13:35:16 2007 +0100 @@ -1,6 +1,11 @@ // Copyright IBM Corp. 2007 -class Xen_HostedService : CIM_HostedService { + +[Association] +class Xen_HostedService : CIM_HostedService +{ }; -class KVM_HostedService : CIM_HostedService { +[Association] +class KVM_HostedService : CIM_HostedService +{ }; From heidieck at linux.vnet.ibm.com Mon Dec 3 11:40:32 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:40:32 +0200 Subject: [Libvirt-cim] [PATCH 1 of 2] ESD: Added Association declaration to mof In-Reply-To: Message-ID: <7a5f0b76faf104aa9892.1196685632@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196685315 -3600 # Node ID 7a5f0b76faf104aa98922194d190724950582712 # Parent cd9afb53c5e76783d891d7bda74d1e642cf6701e ESD: Added Association declaration to mof Signed-off-by: Heidi Eckhart diff -r cd9afb53c5e7 -r 7a5f0b76faf1 schema/ElementSettingData.mof --- a/schema/ElementSettingData.mof Mon Dec 03 13:35:14 2007 +0100 +++ b/schema/ElementSettingData.mof Mon Dec 03 13:35:15 2007 +0100 @@ -1,6 +1,11 @@ // Copyright IBM Corp. 2007 -class Xen_ElementSettingData : CIM_ElementSettingData { + +[Association] +class Xen_ElementSettingData : CIM_ElementSettingData +{ }; -class KVM_ElementSettingData : CIM_ElementSettingData { +[Association] +class KVM_ElementSettingData : CIM_ElementSettingData +{ }; From heidieck at linux.vnet.ibm.com Mon Dec 3 11:40:31 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:40:31 +0200 Subject: [Libvirt-cim] [PATCH 0 of 2] Added Association declaration to mof Message-ID: The qualifier [Association] was missing in the mof for ElementSettingData and HostedSystem. From heidieck at linux.vnet.ibm.com Mon Dec 3 12:45:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 13:45:03 +0100 Subject: [Libvirt-cim] [PATCH 00 of 12] #3 - Adoption of changes to std_assoc struct in std_association for all associations In-Reply-To: <47504320.5080505@linux.vnet.ibm.com> References: <47504320.5080505@linux.vnet.ibm.com> Message-ID: <4753FA4F.3080300@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Heidi Eckhart wrote: >> - fixed SDC: fixed check against CMPIRc in alloc_cap_to_rasd; this >> still needs to be fixed in another patch, as ResourceType is no key >> property but is handled as one > Is this what's causing SDC to return a "Unsupported device type." > error? I had this on my list to investigate, but I'll hold off if > you're looking into it. =) Yes. Kaitlin, if you have time and would like to do it, it would be great if you can you investigate a bit on it ? I would like to have a look into the make_ref() (connect_by_classname) and match_hypervisor_prefix() patch sets for tomorrow. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 3 12:01:42 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 03 Dec 2007 14:01:42 +0200 Subject: [Libvirt-cim] [PATCH] [RFC] make_ref() of associations Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196686834 -3600 # Node ID bea3e027d42ff41fc452935427981739bab76573 # Parent a1582d092f517919470b9ce7ff034b89e4b2bade [RFC] make_ref() of associations While thinking about the implementation of make_ref() and about my proposal to base the asscociation's instance creation on a connect_by_classname, I came to the conclusion that opening a connection to libvirt for not using it, is overkill for this method. Once make_ref() gets called by the std_association logic, the provider can rely on that the prefix of the given reference was checked for the right hypervisor prefix. So I suggest to update all make_ref() functions to use get_typed_instance(). ... and refix some of my fixes :0. Besides that I suggest to rename some of the variables in make_ref() to make the relations clearer. Signed-off-by: Heidi Eckhart diff -r a1582d092f51 -r bea3e027d42f src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Mon Dec 03 13:49:01 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Mon Dec 03 14:00:34 2007 +0100 @@ -241,27 +241,27 @@ static CMPIStatus pool_to_vdev(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, +static CMPIInstance *make_ref(const CMPIObjectPath *source_op, + const CMPIInstance *target_inst, struct std_assoc_info *info, struct std_assoc *assoc) { - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "ElementAllocatedFromPool", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; + CMPIInstance *assoc_inst = NULL; + + assoc_inst = get_typed_instance(_BROKER, + CLASSNAME(source_op), + "ElementAllocatedFromPool", + NAMESPACE(source_op)); + + if (assoc_inst != NULL) { + CMPIObjectPath *target_op; + + target_op = CMGetObjectPath(target_inst, NULL); + + set_reference(assoc, assoc_inst, source_op, target_op); + } + + return assoc_inst; } char* antecedent[] = { From danms at us.ibm.com Mon Dec 3 15:45:55 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 07:45:55 -0800 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration In-Reply-To: (Heidi Eckhart's message of "Mon, 03 Dec 2007 13:36:57 +0200") References: Message-ID: <87sl2j4w98.fsf@theine.beaverton.ibm.com> HE> The association provider was registered for each subclass with a HE> different name. That caused duplicated instances as the same HE> provider gets called twice, but has no chance to figure out for HE> which registration. It does, actually, if you use ASSOC_MATCH(). That was the little hack we used to prevent duplicate entries while enumerating a CIM_Foo class while we were not using connect_by_classname(). However, I think that using the classname connection to prevent duplicates is better. Some care may be required in associations that do not have to connect to libvirt. HE> This patch set tries to fix it. Please review. Thanks. I tested EAFP and it works for me. I'll move on to test the rest, but feedback from others would be good. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Mon Dec 3 16:33:07 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 08:33:07 -0800 Subject: [Libvirt-cim] [PATCH 8 of 9] SD: Provider registered per subclass In-Reply-To: (Heidi Eckhart's message of "Mon, 03 Dec 2007 13:37:05 +0200") References: Message-ID: <87k5nv4u2k.fsf@theine.beaverton.ibm.com> HE> # HG changeset patch HE> # User Heidi Eckhart HE> # Date 1196685313 -3600 HE> # Node ID c6de8c296f561df41811ca04c2ea992b729cfea3 HE> # Parent 909704b38ca4c9bfcb1121924053f26818d8316b HE> SD: Provider registered per subclass Some of these providers still have ASSOC_MATCH() in them which, when combined with your s/Xen_/Virt_/ change to the provider name, causes them to always return no instances. I first noticed this with SystemDevice, but there are others in your set that need to have those calls removed. When I remove them, this patch seems fine to me. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Mon Dec 3 16:44:41 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 03 Dec 2007 11:44:41 -0500 Subject: [Libvirt-cim] [PATCH] Patch guidelines added to SubmittingPatches In-Reply-To: <87fxyoahjn.fsf@theine.beaverton.ibm.com> References: <87mysxauow.fsf@theine.beaverton.ibm.com> <474F2631.40605@linux.vnet.ibm.com> <87fxyoahjn.fsf@theine.beaverton.ibm.com> Message-ID: <47543279.9040905@linux.vnet.ibm.com> Dan Smith wrote: > JG> I wouldn't mind adding a page to the site, especially since then I > JG> could use some nice formatting to make it a little easier to read. > JG> I'm unfamiliar with this xsl thing though, so a primer on that > JG> would be appreciated. > > If you look at the top of the site.xsl, you see all the external pages > that will be generated. Adding something like this would be your > first step. > > > patches.html > > > Then, in the libvirt-cim.html, add a new

and > the content between that and the next

(or EOF) will go into > patches.html. Just run "make" in doc/ to regenerate it each time you > tweak it. > > Just curious, in site.xsl, why do some of the test conditions have truncated names? For example: docs.html It seems that anytime $name would end in "ion" it gets the "ion" or the "on" part at the end cut off. -- -Jay From veillard at redhat.com Mon Dec 3 16:55:51 2007 From: veillard at redhat.com (Daniel Veillard) Date: Mon, 3 Dec 2007 11:55:51 -0500 Subject: [Libvirt-cim] [PATCH] Patch guidelines added to SubmittingPatches In-Reply-To: <47543279.9040905@linux.vnet.ibm.com> References: <87mysxauow.fsf@theine.beaverton.ibm.com> <474F2631.40605@linux.vnet.ibm.com> <87fxyoahjn.fsf@theine.beaverton.ibm.com> <47543279.9040905@linux.vnet.ibm.com> Message-ID: <20071203165551.GD19546@redhat.com> On Mon, Dec 03, 2007 at 11:44:41AM -0500, Jay Gagnon wrote: > Dan Smith wrote: > > JG> I wouldn't mind adding a page to the site, especially since then I > > JG> could use some nice formatting to make it a little easier to read. > > JG> I'm unfamiliar with this xsl thing though, so a primer on that > > JG> would be appreciated. > > > > If you look at the top of the site.xsl, you see all the external pages > > that will be generated. Adding something like this would be your > > first step. > > > > > > patches.html > > > > > > Then, in the libvirt-cim.html, add a new

and > > the content between that and the next

(or EOF) will go into > > patches.html. Just run "make" in doc/ to regenerate it each time you > > tweak it. > > > > > Just curious, in site.xsl, why do some of the test conditions have > truncated names? For example: > > > docs.html > > > It seems that anytime $name would end in "ion" it gets the "ion" or the > "on" part at the end cut off. Haha, it's the magic of reuse (Dan started of will libvirt html I think) and the fact that i used Amaya a long time ago to edit such files, and it was generating the IDs that way. Really no big deal or significance, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From kaitlin at linux.vnet.ibm.com Mon Dec 3 16:58:35 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Dec 2007 08:58:35 -0800 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration In-Reply-To: References: Message-ID: <475435BB.6070902@linux.vnet.ibm.com> Heidi Eckhart wrote: > The association provider was registered for each subclass with a different > name. That caused duplicated instances as the same provider gets > called twice, but has no chance to figure out for which registration. This > patch set tries to fix it. Please review. Thanks. > > Based on: > - #2 Fix (again) VSMCaps and ElementCap > - Remove devid-style InstanceID support from ELEC and EC > Applying these patches didn't fix the dups for me (btw, thanks for finding the dups!). I think the Virt_ provider still gets called twice. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From grendel at linux.vnet.ibm.com Mon Dec 3 17:01:13 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 03 Dec 2007 12:01:13 -0500 Subject: [Libvirt-cim] [PATCH] Patch guidelines added to SubmittingPatches In-Reply-To: <20071203165551.GD19546@redhat.com> References: <87mysxauow.fsf@theine.beaverton.ibm.com> <474F2631.40605@linux.vnet.ibm.com> <87fxyoahjn.fsf@theine.beaverton.ibm.com> <47543279.9040905@linux.vnet.ibm.com> <20071203165551.GD19546@redhat.com> Message-ID: <47543659.5080009@linux.vnet.ibm.com> Daniel Veillard wrote: > On Mon, Dec 03, 2007 at 11:44:41AM -0500, Jay Gagnon wrote: > >> Dan Smith wrote: >> >>> JG> I wouldn't mind adding a page to the site, especially since then I >>> JG> could use some nice formatting to make it a little easier to read. >>> JG> I'm unfamiliar with this xsl thing though, so a primer on that >>> JG> would be appreciated. >>> >>> If you look at the top of the site.xsl, you see all the external pages >>> that will be generated. Adding something like this would be your >>> first step. >>> >>> >>> patches.html >>> >>> >>> Then, in the libvirt-cim.html, add a new

and >>> the content between that and the next

(or EOF) will go into >>> patches.html. Just run "make" in doc/ to regenerate it each time you >>> tweak it. >>> >>> >>> >> Just curious, in site.xsl, why do some of the test conditions have >> truncated names? For example: >> >> >> docs.html >> >> >> It seems that anytime $name would end in "ion" it gets the "ion" or the >> "on" part at the end cut off. >> > > Haha, it's the magic of reuse (Dan started of will libvirt html I think) > and the fact that i used Amaya a long time ago to edit such files, and > it was generating the IDs that way. Really no big deal or significance, > > Oh okay. I was hoping it was something like that, really. I was slightly worried about what the possible explanations could be. :) -- -Jay From danms at us.ibm.com Mon Dec 3 17:06:10 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 09:06:10 -0800 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration In-Reply-To: <475435BB.6070902@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 03 Dec 2007 08:58:35 -0800") References: <475435BB.6070902@linux.vnet.ibm.com> Message-ID: <87fxyj4sjh.fsf@theine.beaverton.ibm.com> KR> Applying these patches didn't fix the dups for me (btw, thanks for KR> finding the dups!). I think the Virt_ provider still gets called KR> twice. Yeah, with more testing, I still get dups as well. Changing back to a unified provider name doesn't change the fact that the CIMOM still calls the provider once per registered class. The unified case prevents us from having a key to filter on too. My previous statement about connect_by_classname() is invalid too, because we use the ref for connecting, which will be, for example, Xen_Foo in both cases (for the KVM instance and the Xen instance of the provider's registration). So, I think the bottom line is: We still need ASSOC_MATCH() and it is the proper way to fix this problem for the associations that we currently have without it. Right? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Mon Dec 3 18:01:21 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Dec 2007 10:01:21 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Added Association declaration to mof In-Reply-To: References: Message-ID: <47544471.5040000@linux.vnet.ibm.com> Heidi Eckhart wrote: > The qualifier [Association] was missing in the mof for ElementSettingData and HostedSystem. > Good catch! Thanks Heidi - these were my mistakes. =) +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Mon Dec 3 18:13:46 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Dec 2007 10:13:46 -0800 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration In-Reply-To: <87fxyj4sjh.fsf@theine.beaverton.ibm.com> References: <475435BB.6070902@linux.vnet.ibm.com> <87fxyj4sjh.fsf@theine.beaverton.ibm.com> Message-ID: <4754475A.6010102@linux.vnet.ibm.com> Dan Smith wrote: > KR> Applying these patches didn't fix the dups for me (btw, thanks for > KR> finding the dups!). I think the Virt_ provider still gets called > KR> twice. > > Yeah, with more testing, I still get dups as well. Changing back to a > unified provider name doesn't change the fact that the CIMOM still > calls the provider once per registered class. The unified case > prevents us from having a key to filter on too. > > My previous statement about connect_by_classname() is invalid too, > because we use the ref for connecting, which will be, for example, > Xen_Foo in both cases (for the KVM instance and the Xen instance of > the provider's registration). > > So, I think the bottom line is: We still need ASSOC_MATCH() and it is > the proper way to fix this problem for the associations that we > currently have without it. > > Right? > Right.. ASSOC_MATCH() solves this problem. There might be another solution, but I'm not sure of one at the moment. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Mon Dec 3 18:56:26 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 11:56:26 -0700 Subject: [Libvirt-cim] [PATCH 1 of 6] Add VirtualSystemMigrationCapabilities In-Reply-To: Message-ID: <143c73b947bd26659f5a.1196711786@theine> # HG changeset patch # User Dan Smith # Date 1196711744 28800 # Node ID 143c73b947bd26659f5a8ef94e471a0a85e526f5 # Parent 7fd4f296b8cc328a7492a24c731d8722bc485452 Add VirtualSystemMigrationCapabilities Signed-off-by: Dan Smith diff -r 7fd4f296b8cc -r 143c73b947bd src/Virt_VSMigrationCapabilities.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationCapabilities.c Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,175 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include + +#include +#include +#include + +#include "libcmpiutil.h" +#include "misc_util.h" +#include "std_instance.h" + +#include "Virt_VSMigrationCapabilities.h" + +const static CMPIBroker *_BROKER; + +#define SVPC_MIG_MVSTH 2 +#define SVPC_MIG_MVSTS 3 +#define SVPC_MIG_CVSIMTH 4 +#define SVPC_MIG_CVSIMTS 5 + +static CMPIStatus set_method_properties(const CMPIBroker *broker, + CMPIInstance *inst) +{ + CMPIArray *array; + CMPIStatus s; + uint16_t val; + + array = CMNewArray(broker, 4, CMPI_INTEGER, &s); + if (s.rc != CMPI_RC_OK) + return s; + + val = SVPC_MIG_MVSTH; + CMSetArrayElementAt(array, 0, (CMPIValue *)&val, CMPI_uint16); + + CMSetProperty(inst, "AsynchronousMethodsSupported", + (CMPIValue *)&array, CMPI_ARRAY); + + CMSetStatus(&s, CMPI_RC_OK); + + return s; +} + +CMPIStatus get_migration_caps(const CMPIObjectPath *ref, + CMPIInstance **_inst, + const CMPIBroker *broker) +{ + CMPIInstance *inst; + CMPIStatus s; + + inst = get_typed_instance(broker, + CLASSNAME(ref), + "VirtualSystemMigrationCapabilities", + NAMESPACE(ref)); + if (inst == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get instance for %s", CLASSNAME(ref)); + return s; + } + + CMSetProperty(inst, "InstanceID", + (CMPIValue *)"MigrationCapabilities", CMPI_chars); + + s = set_method_properties(broker, inst); + + if (s.rc == CMPI_RC_OK) + *_inst = inst; + + return s; +} + +static CMPIStatus return_vsmc(const CMPIObjectPath *ref, + const CMPIResult *results, + bool name_only) +{ + CMPIInstance *inst; + CMPIStatus s; + + s = get_migration_caps(ref, &inst, _BROKER); + + if (s.rc == CMPI_RC_OK) { + if (name_only) + cu_return_instance_name(results, inst); + else + CMReturnInstance(results, inst); + } + + return s; +} + +static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref) +{ + return return_vsmc(ref, results, true); +} + +static CMPIStatus EnumInstances(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + + return return_vsmc(ref, results, false); +} + + +static CMPIStatus GetInstance(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + CMPIInstance *inst; + CMPIStatus s; + const char *prop; + + s = get_migration_caps(ref, &inst, _BROKER); + if (s.rc != CMPI_RC_OK) + return s; + + prop = cu_compare_ref(ref, inst); + if (prop != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (%s)", prop); + } else { + CMReturnInstance(results, inst); + } + + return s; +} + +DEFAULT_CI(); +DEFAULT_MI(); +DEFAULT_DI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, Virt_VSMC, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r 7fd4f296b8cc -r 143c73b947bd src/Virt_VSMigrationCapabilities.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationCapabilities.h Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ + +CMPIStatus get_migration_caps(const CMPIObjectPath *reference, + CMPIInstance **_inst, + const CMPIBroker *broker); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + From danms at us.ibm.com Mon Dec 3 18:56:28 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 11:56:28 -0700 Subject: [Libvirt-cim] [PATCH 3 of 6] Add VirtualSystemMigrationService In-Reply-To: Message-ID: <5ba311c0a725a603bb0e.1196711788@theine> # HG changeset patch # User Dan Smith # Date 1196711744 28800 # Node ID 5ba311c0a725a603bb0e30349ad95d429a88f500 # Parent 2e1935bc44ac74a96a210b0d6c1126e0f14081ef Add VirtualSystemMigrationService Signed-off-by: Dan Smith diff -r 2e1935bc44ac -r 5ba311c0a725 src/Virt_VSMigrationService.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationService.c Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,369 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include + +#include + +#include +#include +#include + +#include "libcmpiutil.h" +#include "misc_util.h" +#include "std_instance.h" +#include "std_invokemethod.h" + +#include "Virt_VSMigrationService.h" + +const static CMPIBroker *_BROKER; + +static CMPIStatus vs_migratable_host(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + RETURN_UNSUPPORTED(); +} + +static CMPIStatus vs_migratable_system(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + RETURN_UNSUPPORTED(); +} + +static const char *transport_from_ref(const CMPIObjectPath *ref) +{ + const char *cn; + + cn = CLASSNAME(ref); + + if (STARTS_WITH(cn, "Xen")) + return "xen+ssh"; + else if (STARTS_WITH(cn, "KVM")) + return "qemu+ssh"; + else + return NULL; +} + +static char *dest_uri(const CMPIObjectPath *ref, + const char *dest) +{ + char *uri; + const char *tport = NULL; + + tport = transport_from_ref(ref); + if (tport == NULL) { + CU_DEBUG("Failed to get transport for %s", CLASSNAME(ref)); + return NULL; + } + + if (asprintf(&uri, "%s://%s/", tport, dest) == -1) + uri = NULL; + + return uri; +} + +static CMPIStatus migrate_vs(const CMPIObjectPath *ref, + const char *domain, + const char *destination) +{ + CMPIStatus s; + virConnectPtr conn = NULL; + virConnectPtr dconn = NULL; + virDomainPtr dom = NULL; + virDomainPtr ddom = NULL; + char *uri = NULL; + + uri = dest_uri(ref, destination); + if (uri == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to construct a valid libvirt URI"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + goto out; + + dom = virDomainLookupByName(conn, domain); + if (dom == NULL) { + CU_DEBUG("Failed to lookup `%s'", domain); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to lookup domain `%s'", domain); + goto out; + } + + dconn = virConnectOpen(uri); + if (conn == NULL) { + CU_DEBUG("Failed to connect to remote host (%s)", uri); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to connect to remote host (%s)", uri); + goto out; + } + + CMSetStatus(&s, CMPI_RC_OK); + CU_DEBUG("Migrating %s -> %s", domain, uri); + + ddom = virDomainMigrate(dom, dconn, VIR_MIGRATE_LIVE, NULL, NULL, 0); + if (ddom == NULL) { + CU_DEBUG("Migration failed"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Migration Failed"); + goto out; + } + + CU_DEBUG("Migration succeeded"); + CMSetStatus(&s, CMPI_RC_OK); + + out: + free(uri); + virDomainFree(dom); + virDomainFree(ddom); + virConnectClose(conn); + virConnectClose(dconn); + + return s; +} + +static CMPIStatus migrate_vs_host(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + CMPIStatus s; + const char *dhost = NULL; + CMPIObjectPath *system; + const char *name = NULL; + + cu_get_str_arg(argsin, "DestinationHost", &dhost); + cu_get_ref_arg(argsin, "ComputerSystem", &system); + + if (cu_get_str_path(system, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in ComputerSystem"); + return s; + } + + return migrate_vs(ref, name, dhost); +} + +static CMPIStatus migrate_vs_system(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + CMPIStatus s; + CMPIObjectPath *dsys; + CMPIObjectPath *sys; + const char *dname; + const char *name; + + cu_get_ref_arg(argsin, "DestinationSystem", &dsys); + cu_get_ref_arg(argsin, "ComputerSystem", &sys); + + if (cu_get_str_path(dsys, "Name", &dname) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in DestinationSystem"); + return s; + } + + if (cu_get_str_path(sys, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in ComputerSystem"); + return s; + } + + return migrate_vs(ref, name, dname); +} + +static struct method_handler vsimth = { + .name = "VirtualSystemIsMigratableToHost", + .handler = vs_migratable_host, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationHost", CMPI_string}, + ARG_END + } +}; + +static struct method_handler vsimts = { + .name = "VirtualSystemIsMigratableToSystem", + .handler = vs_migratable_system, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationSystem", CMPI_ref}, + ARG_END + } +}; + +static struct method_handler mvsth = { + .name = "MigrateVirtualSystemToHost", + .handler = migrate_vs_host, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationHost", CMPI_string}, + ARG_END + } +}; + +static struct method_handler mvsts = { + .name = "MigrateVirtualSystemToSystem", + .handler = migrate_vs_system, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationSystem", CMPI_ref}, + ARG_END + } +}; + +static struct method_handler *my_handlers[] = { + &vsimth, + &vsimts, + &mvsth, + &mvsts, + NULL +}; + +STDIM_MethodMIStub(, Virt_VSMigrationService, _BROKER, + libvirt_cim_init(), my_handlers); + +CMPIStatus get_migration_service(const CMPIObjectPath *ref, + CMPIInstance **_inst, + const CMPIBroker *broker) +{ + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + inst = get_typed_instance(broker, + CLASSNAME(ref), + "VirtualSystemMigrationService", + NAMESPACE(ref)); + if (inst == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get instance for %s", CLASSNAME(ref)); + return s; + } + + CMSetProperty(inst, "Name", + (CMPIValue *)"MigrationService", CMPI_chars); + + *_inst = inst; + + return s; +} + +static CMPIStatus return_vsms(const CMPIObjectPath *ref, + const CMPIResult *results, + bool name_only) +{ + CMPIInstance *inst; + CMPIStatus s; + + s = get_migration_service(ref, &inst, _BROKER); + if (s.rc == CMPI_RC_OK) { + if (name_only) + cu_return_instance_name(results, inst); + else + CMReturnInstance(results, inst); + } + + return s; +} + +static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref) +{ + return return_vsms(ref, results, true); +} + +static CMPIStatus EnumInstances(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + + return return_vsms(ref, results, false); +} + + +static CMPIStatus GetInstance(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + CMPIInstance *inst; + CMPIStatus s; + const char *prop; + + s = get_migration_service(ref, &inst, _BROKER); + if (s.rc != CMPI_RC_OK) + return s; + + prop = cu_compare_ref(ref, inst); + if (prop != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (%s)", prop); + } else { + CMReturnInstance(results, inst); + } + + return s; +} + +DEFAULT_CI(); +DEFAULT_MI(); +DEFAULT_DI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, Virt_VSMigrationService, + _BROKER, + libvirt_cim_init()); +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r 2e1935bc44ac -r 5ba311c0a725 src/Virt_VSMigrationService.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationService.h Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ + +CMPIStatus get_migration_service(const CMPIObjectPath *reference, + CMPIInstance **_inst, + const CMPIBroker *broker); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + From danms at us.ibm.com Mon Dec 3 18:56:29 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 11:56:29 -0700 Subject: [Libvirt-cim] [PATCH 4 of 6] Add build support for VirtualSystemMigrationService In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1196711744 28800 # Node ID d22f5f8cf494b7d1290e58b337843d2d70fc7f96 # Parent 5ba311c0a725a603bb0e30349ad95d429a88f500 Add build support for VirtualSystemMigrationService Signed-off-by: Dan Smith diff -r 5ba311c0a725 -r d22f5f8cf494 Makefile.am --- a/Makefile.am Mon Dec 03 11:55:44 2007 -0800 +++ b/Makefile.am Mon Dec 03 11:55:44 2007 -0800 @@ -34,7 +34,8 @@ MOFS = \ schema/ElementAllocatedFromPool.mof \ schema/HostedService.mof \ schema/ElementSettingData.mof \ - schema/VSMigrationCapabilities.mof + schema/VSMigrationCapabilities.mof \ + schema/VSMigrationService.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -74,7 +75,8 @@ REGS = \ schema/ElementAllocatedFromPool.registration \ schema/HostedService.registration \ schema/ElementSettingData.registration \ - schema/VSMigrationCapabilities.registration + schema/VSMigrationCapabilities.registration \ + schema/VSMigrationService.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 5ba311c0a725 -r d22f5f8cf494 schema/VSMigrationService.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationService.mof Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,41 @@ +// Copyright IBM Corp. 2007 + +// Placeholder definition until schema is available upstream + +class CIM_VirtualSystemMigrationService : CIM_Service { + uint32 VirtualSystemIsMigratableToHost( + [Out] + CIM_ConcreteJob REF Job, + [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] + string NewResourceSettingData[], + [In, EmbeddedInstance("CIM_SettingData")] + string MigrationSettingData, + [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] + string NewSystemSettingData, + [In] + CIM_ComputerSystem REF ComputerSystem, + [In] + string DestinationHost); + + uint32 MigrateVirtualSystemToHost( + [Out] + CIM_ConcreteJob REF Job, + [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] + string NewResourceSettingData[], + [In, EmbeddedInstance("CIM_SettingData")] + string MigrationSettingData, + [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] + string NewSystemSettingData, + [In] + CIM_ComputerSystem REF ComputerSystem, + [In] + string DestinationHost); + +}; + +class Xen_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { +}; + +class KVM_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { +}; + diff -r 5ba311c0a725 -r d22f5f8cf494 schema/VSMigrationService.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationService.registration Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,4 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_VirtualSystemMigrationService root/virt Virt_VSMigrationService Virt_VSMigrationService instance method +KVM_VirtualSystemMigrationService root/virt Virt_VSMigrationService Virt_VSMigrationService instance method \ No newline at end of file diff -r 5ba311c0a725 -r d22f5f8cf494 src/Makefile.am --- a/src/Makefile.am Mon Dec 03 11:55:44 2007 -0800 +++ b/src/Makefile.am Mon Dec 03 11:55:44 2007 -0800 @@ -51,7 +51,8 @@ provider_LTLIBRARIES = libVirt_ComputerS libVirt_ElementAllocatedFromPool.la \ libVirt_HostedService.la \ libVirt_ElementSettingData.la \ - libVirt_VSMigrationCapabilities.la + libVirt_VSMigrationCapabilities.la \ + libVirt_VSMigrationService.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_Device_la_SOURCES = Virt_Device.c @@ -140,4 +141,6 @@ libVirt_ElementSettingData_la_SOURCES = libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c libVirt_ElementSettingData_la_LIBADD = -lVirt_VSSD -lVirt_RASD -libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c \ No newline at end of file +libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c + +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c \ No newline at end of file From danms at us.ibm.com Mon Dec 3 18:56:25 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 11:56:25 -0700 Subject: [Libvirt-cim] [PATCH 0 of 6] Add migration support Message-ID: This patch set adds preliminary migration support based on the current Virtual System Migration Profile. It's not quite done yet, but it does actually migrate VMs (tested with Xen). Still needing to be done are: - MigrationSettingData (perhaps to include ssh/TLS flag?) - Something for IsMigratable methods - Job support - Indication support From danms at us.ibm.com Mon Dec 3 18:56:27 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 11:56:27 -0700 Subject: [Libvirt-cim] [PATCH 2 of 6] Add VirtualSystemMigrationCapabilties build support In-Reply-To: Message-ID: <2e1935bc44ac74a96a21.1196711787@theine> # HG changeset patch # User Dan Smith # Date 1196711744 28800 # Node ID 2e1935bc44ac74a96a210b0d6c1126e0f14081ef # Parent 143c73b947bd26659f5a8ef94e471a0a85e526f5 Add VirtualSystemMigrationCapabilties build support Signed-off-by: Dan Smith diff -r 143c73b947bd -r 2e1935bc44ac Makefile.am --- a/Makefile.am Mon Dec 03 11:55:44 2007 -0800 +++ b/Makefile.am Mon Dec 03 11:55:44 2007 -0800 @@ -33,7 +33,8 @@ MOFS = \ schema/ResourceAllocationFromPool.mof \ schema/ElementAllocatedFromPool.mof \ schema/HostedService.mof \ - schema/ElementSettingData.mof + schema/ElementSettingData.mof \ + schema/VSMigrationCapabilities.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -72,7 +73,8 @@ REGS = \ schema/ResourceAllocationFromPool.registration \ schema/ElementAllocatedFromPool.registration \ schema/HostedService.registration \ - schema/ElementSettingData.registration + schema/ElementSettingData.registration \ + schema/VSMigrationCapabilities.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 143c73b947bd -r 2e1935bc44ac schema/VSMigrationCapabilities.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationCapabilities.mof Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,17 @@ +// Copyright IBM Corp. 2007 + +class Virt_VirtualSystemMigrationCapabilities : CIM_Capabilities { + + uint16 DestinationHostFormatsSupported[]; + + uint16 SynchronousMethodsSupported[]; + + uint16 AsynchronousMethodsSupported[]; + +}; + +class Xen_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { +}; + +class KVM_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { +}; diff -r 143c73b947bd -r 2e1935bc44ac schema/VSMigrationCapabilities.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationCapabilities.registration Mon Dec 03 11:55:44 2007 -0800 @@ -0,0 +1,4 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance +KVM_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance \ No newline at end of file diff -r 143c73b947bd -r 2e1935bc44ac src/Makefile.am --- a/src/Makefile.am Mon Dec 03 11:55:44 2007 -0800 +++ b/src/Makefile.am Mon Dec 03 11:55:44 2007 -0800 @@ -50,7 +50,8 @@ provider_LTLIBRARIES = libVirt_ComputerS libVirt_ResourceAllocationFromPool.la \ libVirt_ElementAllocatedFromPool.la \ libVirt_HostedService.la \ - libVirt_ElementSettingData.la + libVirt_ElementSettingData.la \ + libVirt_VSMigrationCapabilities.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_Device_la_SOURCES = Virt_Device.c @@ -138,3 +139,5 @@ libVirt_ElementSettingData_la_DEPENDENCI libVirt_ElementSettingData_la_DEPENDENCIES = libVirt_VSSD.la libVirt_RASD.la libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c libVirt_ElementSettingData_la_LIBADD = -lVirt_VSSD -lVirt_RASD + +libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c \ No newline at end of file From danms at us.ibm.com Mon Dec 3 18:56:30 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 11:56:30 -0700 Subject: [Libvirt-cim] [PATCH 5 of 6] Add HostedService support for VirtualSystemMigrationService In-Reply-To: Message-ID: <316176ff9b6325e920a8.1196711790@theine> # HG changeset patch # User Dan Smith # Date 1196711744 28800 # Node ID 316176ff9b6325e920a8484d09793c16026d1ce7 # Parent d22f5f8cf494b7d1290e58b337843d2d70fc7f96 Add HostedService support for VirtualSystemMigrationService Signed-off-by: Dan Smith diff -r d22f5f8cf494 -r 316176ff9b63 src/Makefile.am --- a/src/Makefile.am Mon Dec 03 11:55:44 2007 -0800 +++ b/src/Makefile.am Mon Dec 03 11:55:44 2007 -0800 @@ -133,9 +133,9 @@ libVirt_ElementAllocatedFromPool_la_SOUR libVirt_ElementAllocatedFromPool_la_SOURCES = Virt_ElementAllocatedFromPool.c libVirt_ElementAllocatedFromPool_la_LIBADD = -lVirt_DevicePool -lVirt_Device -libVirt_HostedService_la_DEPENDENCIES = libVirt_VirtualSystemManagementService.la libVirt_ResourcePoolConfigurationService.la +libVirt_HostedService_la_DEPENDENCIES = libVirt_VirtualSystemManagementService.la libVirt_ResourcePoolConfigurationService.la libVirt_VSMigrationService.la libVirt_HostedService_la_SOURCES = Virt_HostedService.c -libVirt_HostedService_la_LIBADD = -lVirt_VirtualSystemManagementService -lVirt_ResourcePoolConfigurationService +libVirt_HostedService_la_LIBADD = -lVirt_VirtualSystemManagementService -lVirt_ResourcePoolConfigurationService -lVirt_VSMigrationService libVirt_ElementSettingData_la_DEPENDENCIES = libVirt_VSSD.la libVirt_RASD.la libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c diff -r d22f5f8cf494 -r 316176ff9b63 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Mon Dec 03 11:55:44 2007 -0800 +++ b/src/Virt_HostedService.c Mon Dec 03 11:55:44 2007 -0800 @@ -33,6 +33,7 @@ #include "Virt_HostSystem.h" #include "Virt_VirtualSystemManagementService.h" #include "Virt_ResourcePoolConfigurationService.h" +#include "Virt_VSMigrationService.h" const static CMPIBroker *_BROKER; @@ -72,6 +73,12 @@ static CMPIStatus host_to_service(const return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); + + s = get_migration_service(ref, &inst, _BROKER); + if (s.rc != CMPI_RC_OK) + return s; + if (!CMIsNullObject(inst)) + inst_list_add(list, inst); return s; } @@ -116,8 +123,10 @@ char* dependent[] = { char* dependent[] = { "Xen_ResourcePoolConfigurationService", "Xen_VirtualSystemManagementService", + "Xen_VirtualSystemMigrationService", "KVM_ResourcePoolConfigurationService", "KVM_VirtualSystemManagementService", + "KVM_VirtualSystemMigrationService", NULL }; From danms at us.ibm.com Mon Dec 3 18:56:31 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 11:56:31 -0700 Subject: [Libvirt-cim] [PATCH 6 of 6] Add ElementCapabilities support for VirtualSystemMigrationCapabilities In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1196711755 28800 # Node ID f1cece43c3fd0f0646729ab378bfdbcc303ecbf9 # Parent 316176ff9b6325e920a8484d09793c16026d1ce7 Add ElementCapabilities support for VirtualSystemMigrationCapabilities Signed-off-by: Dan Smith diff -r 316176ff9b63 -r f1cece43c3fd src/Makefile.am --- a/src/Makefile.am Mon Dec 03 11:55:44 2007 -0800 +++ b/src/Makefile.am Mon Dec 03 11:55:55 2007 -0800 @@ -88,12 +88,13 @@ libVirt_ElementConformsToProfile_la_LIBA libVirt_EnabledLogicalElementCapabilities_la_SOURCES = Virt_EnabledLogicalElementCapabilities.c -libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la +libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \ -lVirt_EnabledLogicalElementCapabilities \ -lVirt_ComputerSystem \ - -lVirt_HostSystem + -lVirt_HostSystem \ + -lVirt_VSMigrationCapabilities libVirt_AllocationCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c diff -r 316176ff9b63 -r f1cece43c3fd src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Dec 03 11:55:44 2007 -0800 +++ b/src/Virt_ElementCapabilities.c Mon Dec 03 11:55:55 2007 -0800 @@ -37,6 +37,7 @@ #include "Virt_EnabledLogicalElementCapabilities.h" #include "Virt_ComputerSystem.h" #include "Virt_HostSystem.h" +#include "Virt_VSMigrationCapabilities.h" /* Associate an XXX_Capabilities to the proper XXX_ManagedElement. * @@ -70,6 +71,11 @@ static CMPIStatus sys_to_cap(const CMPIO s = get_vsm_cap(_BROKER, ref, &inst); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); + + s = get_migration_caps(ref, &inst, _BROKER); + if (s.rc == CMPI_RC_OK) + inst_list_add(list, inst); + out: return s; } @@ -249,8 +255,10 @@ char* host_system[] = { char* virtual_system_management_capabilities[] = { "Xen_VirtualSystemManagementCapabilities", + "Xen_VirtualSystemMigrationCapabilities", "KVM_VirtualSystemManagementCapabilities", - NULL + "KVM_VirtualSystemMigrationCapabilities", + NULL, }; struct std_assoc system_to_vsm_cap = { From grendel at linux.vnet.ibm.com Mon Dec 3 21:47:50 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 03 Dec 2007 16:47:50 -0500 Subject: [Libvirt-cim] [PATCH] [RFC] make_ref() of associations In-Reply-To: References: Message-ID: <47547986.2000701@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1196686834 -3600 > # Node ID bea3e027d42ff41fc452935427981739bab76573 > # Parent a1582d092f517919470b9ce7ff034b89e4b2bade > [RFC] make_ref() of associations > > While thinking about the implementation of make_ref() and about > my proposal to base the asscociation's instance creation on a > connect_by_classname, I came to the conclusion that opening a > connection to libvirt for not using it, is overkill for this > method. Once make_ref() gets called by the std_association logic, > the provider can rely on that the prefix of the given reference > was checked for the right hypervisor prefix. So I suggest to > update all make_ref() functions to use get_typed_instance(). > ... and refix some of my fixes :0. > Besides that I suggest to rename some of the variables in > make_ref() to make the relations clearer. > Signed-off-by: Heidi Eckhart > > diff -r a1582d092f51 -r bea3e027d42f src/Virt_ElementAllocatedFromPool.c > --- a/src/Virt_ElementAllocatedFromPool.c Mon Dec 03 13:49:01 2007 +0100 > +++ b/src/Virt_ElementAllocatedFromPool.c Mon Dec 03 14:00:34 2007 +0100 > @@ -241,27 +241,27 @@ static CMPIStatus pool_to_vdev(const CMP > return s; > } > > -static CMPIInstance *make_ref(const CMPIObjectPath *ref, > - const CMPIInstance *inst, > +static CMPIInstance *make_ref(const CMPIObjectPath *source_op, > + const CMPIInstance *target_inst, > struct std_assoc_info *info, > struct std_assoc *assoc) > { > - CMPIInstance *refinst = NULL; > - > - refinst = get_typed_instance(_BROKER, > - CLASSNAME(ref), > - "ElementAllocatedFromPool", > - NAMESPACE(ref)); > - > - if (refinst != NULL) { > - CMPIObjectPath *instop; > - > - instop = CMGetObjectPath(inst, NULL); > - > - set_reference(assoc, refinst, ref, instop); > - } > - > - return refinst; > + CMPIInstance *assoc_inst = NULL; > + > + assoc_inst = get_typed_instance(_BROKER, > + CLASSNAME(source_op), > + "ElementAllocatedFromPool", > + NAMESPACE(source_op)); > + > + if (assoc_inst != NULL) { > + CMPIObjectPath *target_op; > + > + target_op = CMGetObjectPath(target_inst, NULL); > + > + set_reference(assoc, assoc_inst, source_op, target_op); > + } > + > + return assoc_inst; > } > > char* antecedent[] = { > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > Couple of things here. First thing, I'm okay with renaming things to make it more clear, but I'm not really a fan of using "op" for ObjectPath. I realize it's a more logical abbreviation than "ref", but we use "ref" in so many places that I think it's pretty firmly established, and I personally always see "op" and think "operand" or "operation." I would recommend a compromise of "source_ref" for that one. Second thing, I think I'm missing something in the first paragraph of your commit message. I'm not entirely sure I understand the explanation that leads up to "So I suggest to update all make_ref() functions to use get_typed_instance()," and it also doesn't seem to really relate to this patch, which only appears to do some renaming in make_ref. It seems like a good point of discussion, and clarification would be good, but maybe we should move it to a separate thread and limit this patch discussion to the variable naming. -- -Jay From grendel at linux.vnet.ibm.com Mon Dec 3 22:01:25 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 03 Dec 2007 17:01:25 -0500 Subject: [Libvirt-cim] [PATCH 1 of 6] Add VirtualSystemMigrationCapabilities In-Reply-To: <143c73b947bd26659f5a.1196711786@theine> References: <143c73b947bd26659f5a.1196711786@theine> Message-ID: <47547CB5.3010401@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1196711744 28800 > # Node ID 143c73b947bd26659f5a8ef94e471a0a85e526f5 > # Parent 7fd4f296b8cc328a7492a24c731d8722bc485452 > Add VirtualSystemMigrationCapabilities > > Signed-off-by: Dan Smith > > + > +static CMPIStatus set_method_properties(const CMPIBroker *broker, > + CMPIInstance *inst) > +{ > + CMPIArray *array; > + CMPIStatus s; > + uint16_t val; > + > + array = CMNewArray(broker, 4, CMPI_INTEGER, &s); > + if (s.rc != CMPI_RC_OK) > + return s; > + > + val = SVPC_MIG_MVSTH; > + CMSetArrayElementAt(array, 0, (CMPIValue *)&val, CMPI_uint16); > + > + CMSetProperty(inst, "AsynchronousMethodsSupported", > + (CMPIValue *)&array, CMPI_ARRAY); > + > + CMSetStatus(&s, CMPI_RC_OK); > + > + return s; > +} > Just curious, why do you make an array of four elements but only put one item in it? Or am I just misunderstanding what's going on there? -- -Jay From danms at us.ibm.com Mon Dec 3 22:13:47 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 14:13:47 -0800 Subject: [Libvirt-cim] [PATCH] [RFC] make_ref() of associations In-Reply-To: <47547986.2000701@linux.vnet.ibm.com> (Jay Gagnon's message of "Mon, 03 Dec 2007 16:47:50 -0500") References: <47547986.2000701@linux.vnet.ibm.com> Message-ID: <873auj4eas.fsf@theine.beaverton.ibm.com> JG> I realize it's a more logical abbreviation than "ref", but we use JG> "ref" in so many places that I think it's pretty firmly JG> established For the parameter, I think source_ref would be fine. I don't think changing it to not include "ref" makes it more clear, since the convention (as it seems to me) is that the object path you pass in as the "subject" of an operation is called the "reference". For the "refinst" local variable, I think leaving "ref" in the name also makes sense. The goal of the function is to "make a reference", so "refinst" seems to be a reasonable name :) JG> I personally always see "op" and think "operand" or "operation." I JG> would recommend a compromise of "source_ref" for that one. Me too! I'd be okay with "source_ref", but I question how much more clarity it will bring given how much patch churn it will produce. However, if others want this change, I'm okay with it. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Mon Dec 3 22:21:10 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 03 Dec 2007 17:21:10 -0500 Subject: [Libvirt-cim] [PATCH 0 of 6] Add migration support In-Reply-To: References: Message-ID: <47548156.7060705@linux.vnet.ibm.com> Dan Smith wrote: > This patch set adds preliminary migration support based on the current > Virtual System Migration Profile. It's not quite done yet, but it does > actually migrate VMs (tested with Xen). > > Still needing to be done are: > - MigrationSettingData (perhaps to include ssh/TLS flag?) > - Something for IsMigratable methods > - Job support > - Indication support > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > Other than the one question for patch number one, which I expect you'll have a good answer for, this looks good to me. I won't pretend to understand exactly what is going on with the actual migration, but your CIM side of things looks pretty good, and since it looks like libvirt is doing most of the heavy lifting for us anyway (and you said it works in testing), this looks like a pretty good start. I assume the "still needing to be done" stuff doesn't block what you've got here? If so, +1. -- -Jay From danms at us.ibm.com Mon Dec 3 23:11:38 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 15:11:38 -0800 Subject: [Libvirt-cim] [PATCH 1 of 6] Add VirtualSystemMigrationCapabilities In-Reply-To: <47547CB5.3010401@linux.vnet.ibm.com> (Jay Gagnon's message of "Mon, 03 Dec 2007 17:01:25 -0500") References: <143c73b947bd26659f5a.1196711786@theine> <47547CB5.3010401@linux.vnet.ibm.com> Message-ID: <87y7cb2x1x.fsf@theine.beaverton.ibm.com> JG> Just curious, why do you make an array of four elements but only JG> put one item in it? Or am I just misunderstanding what's going on JG> there? Heh, whoops. Initially, I added the "migrate to host" function in MigrationService and just added it as an async method in the capabilites. I need to go back and add the other three as well. However, two of them will be async and two will be sync, so I'll actually make this array 2-big and add another for the sync calls. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Tue Dec 4 01:21:55 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Dec 2007 17:21:55 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Remove devid-style InstanceID support from ELEC and EC. In-Reply-To: <4753ECF5.2030502@linux.vnet.ibm.com> References: <4753ECF5.2030502@linux.vnet.ibm.com> Message-ID: <4754ABB3.2000504@linux.vnet.ibm.com> Heidi Eckhart wrote: > There seems to be something broken by the last patch set series > (applied the two from Dan, followed by the two from Kaitlin). > > Before applying patch set: > wbemein http://localhost/root/virt:CIM_EnabledLogicalElementCapabilities > > localhost:5988/root/virt:KVM_VirtualSystemManagementCapabilities.InstanceID="localhost.localdomain/0" > > localhost:5988/root/virt:KVM_EnabledLogicalElementCapabilities.InstanceID="qemu1/0" > > > After applying patch set: > wbemein http://localhost/root/virt:CIM_EnabledLogicalElementCapabilities > > localhost:5988/root/virt:KVM_VirtualSystemManagementCapabilities.InstanceID="ManagementCapabilities" > > localhost:5988/root/virt:Xen_VirtualSystemManagementCapabilities.InstanceID="ManagementCapabilities" > > localhost:5988/root/virt:KVM_EnabledLogicalElementCapabilities.InstanceID="qemu1" > > > The instance of Xen_VirtualSystemManagementCapabilities is wrong. I > had a look into the code and think this could be easily fixed by > starting return_vsm_cap() with an connect_by_classname(). Kaitlin, > please can you incorporate that fix into your patch set ? Thanks. > Thanks for catching this Heidi. I didn't have a chance to look at it today, so I will take a look tomorrow. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Dec 4 01:24:28 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Dec 2007 17:24:28 -0800 Subject: [Libvirt-cim] [PATCH 00 of 12] #3 - Adoption of changes to std_assoc struct in std_association for all associations In-Reply-To: <4753FA4F.3080300@linux.vnet.ibm.com> References: <47504320.5080505@linux.vnet.ibm.com> <4753FA4F.3080300@linux.vnet.ibm.com> Message-ID: <4754AC4C.8090004@linux.vnet.ibm.com> Heidi Eckhart wrote: > Kaitlin Rupert wrote: >> Heidi Eckhart wrote: >>> - fixed SDC: fixed check against CMPIRc in alloc_cap_to_rasd; this >>> still needs to be fixed in another patch, as ResourceType is no key >>> property but is handled as one >> Is this what's causing SDC to return a "Unsupported device type." >> error? I had this on my list to investigate, but I'll hold off if >> you're looking into it. =) > Yes. Kaitlin, if you have time and would like to do it, it would be > great if you can you investigate a bit on it ? I would like to have a > look into the make_ref() (connect_by_classname) and > match_hypervisor_prefix() patch sets for tomorrow. > Sure, I'll add this to my list of things to investigate. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Dec 4 01:53:55 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Dec 2007 17:53:55 -0800 Subject: [Libvirt-cim] [PATCH 3 of 6] Add VirtualSystemMigrationService In-Reply-To: <5ba311c0a725a603bb0e.1196711788@theine> References: <5ba311c0a725a603bb0e.1196711788@theine> Message-ID: <4754B333.4000404@linux.vnet.ibm.com> Dan Smith wrote: > + > + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); > + if (conn == NULL) > + goto out; > + > + dom = virDomainLookupByName(conn, domain); > + if (dom == NULL) { > + CU_DEBUG("Failed to lookup `%s'", domain); > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Failed to lookup domain `%s'", domain); > + goto out; > + } > + > + dconn = virConnectOpen(uri); > + if (conn == NULL) { > I think to mean: if (dconn == NULL) > + CU_DEBUG("Failed to connect to remote host (%s)", uri); > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Failed to connect to remote host (%s)", uri); > + goto out; > + } > + > + CMSetStatus(&s, CMPI_RC_OK); > I'm unsure why you call CMSetStatus() before calling virDomainMigrate(). If virDomainMigrate() fails, we set a failure status. Otherwise, we set the status again below. Although, setting it here is harmless anyway. =) > + CU_DEBUG("Migrating %s -> %s", domain, uri); > + > + ddom = virDomainMigrate(dom, dconn, VIR_MIGRATE_LIVE, NULL, NULL, 0); > + if (ddom == NULL) { > + CU_DEBUG("Migration failed"); > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Migration Failed"); > + goto out; > + } > + > + CU_DEBUG("Migration succeeded"); > + CMSetStatus(&s, CMPI_RC_OK); > + > + out: > -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Tue Dec 4 01:57:32 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 17:57:32 -0800 Subject: [Libvirt-cim] [PATCH 3 of 6] Add VirtualSystemMigrationService In-Reply-To: <4754B333.4000404@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 03 Dec 2007 17:53:55 -0800") References: <5ba311c0a725a603bb0e.1196711788@theine> <4754B333.4000404@linux.vnet.ibm.com> Message-ID: <87lk8b2pdf.fsf@theine.beaverton.ibm.com> KR> I think to mean: KR> if (dconn == NULL) I think to mean that too :) KR> I'm unsure why you call CMSetStatus() before calling KR> virDomainMigrate(). If virDomainMigrate() fails, we set a failure KR> status. Otherwise, we set the status again below. Although, KR> setting it here is harmless anyway. =) Heh, oops. The reason is that when I was first working on it, the whole migrate function was just setting status to OK, which I apparently never removed. I've got a new version of this cooked up with more function anyway, I'll make these changes and send it out tomorrow. Thanks :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Tue Dec 4 02:04:05 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Dec 2007 18:04:05 -0800 Subject: [Libvirt-cim] [PATCH 3 of 6] Add VirtualSystemMigrationService In-Reply-To: <87lk8b2pdf.fsf@theine.beaverton.ibm.com> References: <5ba311c0a725a603bb0e.1196711788@theine> <4754B333.4000404@linux.vnet.ibm.com> <87lk8b2pdf.fsf@theine.beaverton.ibm.com> Message-ID: <4754B595.6080506@linux.vnet.ibm.com> Dan Smith wrote: > KR> I think to mean: > KR> if (dconn == NULL) > > I think to mean that too :) > Excellent typo on my part ;) > KR> I'm unsure why you call CMSetStatus() before calling > KR> virDomainMigrate(). If virDomainMigrate() fails, we set a failure > KR> status. Otherwise, we set the status again below. Although, > KR> setting it here is harmless anyway. =) > > Heh, oops. The reason is that when I was first working on it, the > whole migrate function was just setting status to OK, which I > apparently never removed. > > I've got a new version of this cooked up with more function anyway, > I'll make these changes and send it out tomorrow. > > Thanks :) > Could you also include instructions on testing migration? It seems difficult to do via wbemcli - I haven't tested a method provider before. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From daisy at linux.vnet.ibm.com Tue Dec 4 02:15:20 2007 From: daisy at linux.vnet.ibm.com (daisy) Date: Tue, 04 Dec 2007 10:15:20 +0800 Subject: [Libvirt-cim] Null of InstanceID in ein ResourcePoolConfigurationCapabilities Message-ID: <4754B838.4050208@linux.vnet.ibm.com> Hi, I try to test VirtualSystemManagementCapabilities and get results as follows: "wbemcli ein http://root:password at localhost:5988/root/virt:Xen_ResourcePoolConfigurationCapabilities" localhost:5988/root/virt:Xen_ResourcePoolConfigurationCapabilities.InstanceID="" As a property of ResourcePoolConfigurationCapabilities, is InstanceID need to set in provider? Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 From danms at us.ibm.com Tue Dec 4 02:39:05 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Dec 2007 18:39:05 -0800 Subject: [Libvirt-cim] Null of InstanceID in ein ResourcePoolConfigurationCapabilities In-Reply-To: <4754B838.4050208@linux.vnet.ibm.com> (daisy@linux.vnet.ibm.com's message of "Tue, 04 Dec 2007 10:15:20 +0800") References: <4754B838.4050208@linux.vnet.ibm.com> Message-ID: <87hciz2ng6.fsf@theine.beaverton.ibm.com> D> As a property of ResourcePoolConfigurationCapabilities, is D> InstanceID need to set in provider? Yep, InstanceID should be set. Thanks for pointing that out :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From lizg at cn.ibm.com Tue Dec 4 10:25:30 2007 From: lizg at cn.ibm.com (lizg at cn.ibm.com) Date: Tue, 04 Dec 2007 18:25:30 +0800 Subject: [Libvirt-cim] [PATCH] Fix typos for disk & network classes in SDC SD & EAFP Message-ID: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> # HG changeset patch # User Zhengang Li # Date 1196763876 -28800 # Node ID 7dbad83883a3f5eaeedac4e415a97fb459ec50e5 # Parent 7fd4f296b8cc328a7492a24c731d8722bc485452 Fix typos for disk & network classes in SDC SD & EAFP *_LogicalDisk & *_NetworkPort classes are typo-ed as *_Disk & *_Network in several assoc classes' handler param. This leads to some assoc failure. Signed-off-by: Zhengang Li diff -r 7fd4f296b8cc -r 7dbad83883a3 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Mon Dec 03 13:35:16 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Tue Dec 04 18:24:36 2007 +0800 @@ -279,12 +279,12 @@ char* dependent[] = { char* dependent[] = { "Xen_Processor", "Xen_Memory", - "Xen_Network", - "Xen_Disk", + "Xen_NetworkPort", + "Xen_LogicalDisk", "KVM_Processor", "KVM_Memory", - "KVM_Network", - "KVM_Disk", + "KVM_NetworkPort", + "KVM_LogicalDisk", NULL }; diff -r 7fd4f296b8cc -r 7dbad83883a3 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Mon Dec 03 13:35:16 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Tue Dec 04 18:24:36 2007 +0800 @@ -304,12 +304,12 @@ char* logical_device[] = { char* logical_device[] = { "Xen_Processor", "Xen_Memory", - "Xen_Network", - "Xen_Disk", + "Xen_NetworkPort", + "Xen_LogicalDisk", "KVM_Processor", "KVM_Memory", - "KVM_Network", - "KVM_Disk", + "KVM_NetworkPort", + "KVM_LogicalDisk", NULL }; diff -r 7fd4f296b8cc -r 7dbad83883a3 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Mon Dec 03 13:35:16 2007 +0100 +++ b/src/Virt_SystemDevice.c Tue Dec 04 18:24:36 2007 +0800 @@ -241,12 +241,12 @@ char* part_component[] = { char* part_component[] = { "Xen_Processor", "Xen_Memory", - "Xen_Network", - "Xen_Disk", + "Xen_NetworkPort", + "Xen_LogicalDisk", "KVM_Processor", "KVM_Memory", - "KVM_Network", - "KVM_Disk", + "KVM_NetworkPort", + "KVM_LogicalDisk", NULL }; From zli at linux.vnet.ibm.com Tue Dec 4 10:30:43 2007 From: zli at linux.vnet.ibm.com (Zhengang Li) Date: Tue, 04 Dec 2007 18:30:43 +0800 Subject: [Libvirt-cim] [PATCH] Fix typos for disk & network classes in SDC SD & EAFP In-Reply-To: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> References: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> Message-ID: <47552C53.1090600@linux.vnet.ibm.com> lizg at cn.ibm.com wrote: > # HG changeset patch > # User Zhengang Li > # Date 1196763876 -28800 > # Node ID 7dbad83883a3f5eaeedac4e415a97fb459ec50e5 > # Parent 7fd4f296b8cc328a7492a24c731d8722bc485452 > Fix typos for disk & network classes in SDC SD & EAFP > > *_LogicalDisk & *_NetworkPort classes are typo-ed as *_Disk & *_Network > in several assoc classes' handler param. This leads to some assoc failure. This is "No handler found" failure I saw on cimom's log. The fix should bring back some of the test cases failure. :) > > Signed-off-by: Zhengang Li > > diff -r 7fd4f296b8cc -r 7dbad83883a3 src/Virt_ElementAllocatedFromPool.c > --- a/src/Virt_ElementAllocatedFromPool.c Mon Dec 03 13:35:16 2007 +0100 > +++ b/src/Virt_ElementAllocatedFromPool.c Tue Dec 04 18:24:36 2007 +0800 > @@ -279,12 +279,12 @@ char* dependent[] = { > char* dependent[] = { > "Xen_Processor", > "Xen_Memory", > - "Xen_Network", > - "Xen_Disk", > + "Xen_NetworkPort", > + "Xen_LogicalDisk", > "KVM_Processor", > "KVM_Memory", > - "KVM_Network", > - "KVM_Disk", > + "KVM_NetworkPort", > + "KVM_LogicalDisk", > NULL > }; > > diff -r 7fd4f296b8cc -r 7dbad83883a3 src/Virt_SettingsDefineState.c > --- a/src/Virt_SettingsDefineState.c Mon Dec 03 13:35:16 2007 +0100 > +++ b/src/Virt_SettingsDefineState.c Tue Dec 04 18:24:36 2007 +0800 > @@ -304,12 +304,12 @@ char* logical_device[] = { > char* logical_device[] = { > "Xen_Processor", > "Xen_Memory", > - "Xen_Network", > - "Xen_Disk", > + "Xen_NetworkPort", > + "Xen_LogicalDisk", > "KVM_Processor", > "KVM_Memory", > - "KVM_Network", > - "KVM_Disk", > + "KVM_NetworkPort", > + "KVM_LogicalDisk", > NULL > }; > > diff -r 7fd4f296b8cc -r 7dbad83883a3 src/Virt_SystemDevice.c > --- a/src/Virt_SystemDevice.c Mon Dec 03 13:35:16 2007 +0100 > +++ b/src/Virt_SystemDevice.c Tue Dec 04 18:24:36 2007 +0800 > @@ -241,12 +241,12 @@ char* part_component[] = { > char* part_component[] = { > "Xen_Processor", > "Xen_Memory", > - "Xen_Network", > - "Xen_Disk", > + "Xen_NetworkPort", > + "Xen_LogicalDisk", > "KVM_Processor", > "KVM_Memory", > - "KVM_Network", > - "KVM_Disk", > + "KVM_NetworkPort", > + "KVM_LogicalDisk", > NULL > }; > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- - Zhengang From heidieck at linux.vnet.ibm.com Tue Dec 4 12:33:48 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 04 Dec 2007 13:33:48 +0100 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration In-Reply-To: <4754475A.6010102@linux.vnet.ibm.com> References: <475435BB.6070902@linux.vnet.ibm.com> <87fxyj4sjh.fsf@theine.beaverton.ibm.com> <4754475A.6010102@linux.vnet.ibm.com> Message-ID: <4755492C.1070409@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Dan Smith wrote: >> KR> Applying these patches didn't fix the dups for me (btw, thanks for >> KR> finding the dups!). I think the Virt_ provider still gets called >> KR> twice. >> >> Yeah, with more testing, I still get dups as well. Changing back to a >> unified provider name doesn't change the fact that the CIMOM still >> calls the provider once per registered class. Yes, for Pegasus, but not for sfcb - sfcb calls the association provider only once, with the client's assocClass (e.g. CIM_SystemDevice), while Pegasus manipulates assocClass to fit the subclass' association name (Xen_SystemDevice and KVM_SystemDevice) and calls the provider for each subclass. >> The unified case >> prevents us from having a key to filter on too. Therefore I added match_hypervisor_prefix() function, which compares the given ref prefix with the client requested assocClass and resultClass prefix. >> >> My previous statement about connect_by_classname() is invalid too, >> because we use the ref for connecting, which will be, for example, >> Xen_Foo in both cases (for the KVM instance and the Xen instance of >> the provider's registration). Yes, we can not use the ref to figure out for which association the provider was called. :( >> >> So, I think the bottom line is: We still need ASSOC_MATCH() and it is >> the proper way to fix this problem for the associations that we >> currently have without it. >> >> Right? >> > Right.. ASSOC_MATCH() solves this problem. There might be another > solution, but I'm not sure of one at the moment. > Right. And I also know, that the ASSOC_MATCH solution was developed to deal with Pegasus' special behavior to handle association requests. As mentioned above, sfcb is calling the Virt_ providers only once. We could now start a discussion which solution is the right one, but as we will not be the ones who decide on this, I would like to implement a solutions, that also makes use of the optimized sfcb behavior, where the provider is called only once. My suggestion now is, to replace ASSOC_MATCH by match_hypervisor_prefix() and register Virt_ providers instead of Xen_/KVM_ for each subclass. The advantage can not be seen with Pegasus, as Pegasus will still call the provider for each subclass with the manipulated assocClass. But for sfcb we get rid of an unnecessary provider call. What do you think ? But you both are right - the patch set is buggy and needs to be fixed in regard to ASSOC_MATCH. Thanks for making me aware of it. Will try to send out a fix as soon as possible. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From kaitlin at linux.vnet.ibm.com Tue Dec 4 15:34:23 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 07:34:23 -0800 Subject: [Libvirt-cim] [PATCH] Fix typos for disk & network classes in SDC SD & EAFP In-Reply-To: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> References: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> Message-ID: <4755737F.5090108@linux.vnet.ibm.com> lizg at cn.ibm.com wrote: > # HG changeset patch > # User Zhengang Li > # Date 1196763876 -28800 > # Node ID 7dbad83883a3f5eaeedac4e415a97fb459ec50e5 > # Parent 7fd4f296b8cc328a7492a24c731d8722bc485452 > Fix typos for disk & network classes in SDC SD & EAFP > > *_LogicalDisk & *_NetworkPort classes are typo-ed as *_Disk & *_Network > in several assoc classes' handler param. This leads to some assoc failure. > > Signed-off-by: Zhengang Li > Excellent catch! +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Tue Dec 4 15:35:41 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 07:35:41 -0800 Subject: [Libvirt-cim] [PATCH] Fix typos for disk & network classes in SDC SD & EAFP References: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> Message-ID: <87odd61nhu.fsf@theine.beaverton.ibm.com> ZL> # HG changeset patch ZL> # User Zhengang Li ZL> # Date 1196763876 -28800 ZL> # Node ID 7dbad83883a3f5eaeedac4e415a97fb459ec50e5 ZL> # Parent 7fd4f296b8cc328a7492a24c731d8722bc485452 ZL> Fix typos for disk & network classes in SDC SD & EAFP Excellent catch. I think this was just changed recently. I should have spotted those errors before I committed the change. Thanks a lot! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Tue Dec 4 15:36:49 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 07:36:49 -0800 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration References: <475435BB.6070902@linux.vnet.ibm.com> <87fxyj4sjh.fsf@theine.beaverton.ibm.com> <4754475A.6010102@linux.vnet.ibm.com> <4755492C.1070409@linux.vnet.ibm.com> Message-ID: <87hciy1nfy.fsf@theine.beaverton.ibm.com> HE> Yes, for Pegasus, but not for sfcb - sfcb calls the association HE> provider only once, with the client's assocClass HE> (e.g. CIM_SystemDevice), while Pegasus manipulates assocClass to HE> fit the subclass' association name (Xen_SystemDevice and HE> KVM_SystemDevice) and calls the provider for each subclass. Ah, okay. Hmm, that's unfortunate that they behave so differently. So, if you resolve the association with an assocClass of CIM_Foo on sfcb, the provider handler actually sees CIM_Foo as the assocClass, per my testing just now. So we need to make sure that we don't use the assocClass (or resultClass) as the target of a connect_by_classname(). Might be obvious, but I just wanted to make it explicit. HE> Therefore I added match_hypervisor_prefix() function, which HE> compares the given ref prefix with the client requested assocClass HE> and resultClass prefix. Okay, looking at that now, it makes more sense. I was confusing match_hypervisor_prefix() with match_pn_to_cn(). HE> Right. And I also know, that the ASSOC_MATCH solution was developed to HE> deal with Pegasus' special behavior to handle association requests. Well, I didn't know it was special to Pegasus at the time :) I thought we were seeing the same behavior out of sfcb as well. HE> As mentioned above, sfcb is calling the Virt_ providers only HE> once. We could now start a discussion which solution is the right HE> one, but as we will not be the ones who decide on this, Personally, Pegasus' behavior makes more logical sense to me, but the sfcb case does seem more efficient. HE> I would like to implement a solutions, that also makes use of the HE> optimized sfcb behavior, where the provider is called only once. Agreed. HE> My suggestion now is, to replace ASSOC_MATCH by HE> match_hypervisor_prefix() and register Virt_ providers instead of HE> Xen_/KVM_ for each subclass. The advantage can not be seen with HE> Pegasus, as Pegasus will still call the provider for each subclass HE> with the manipulated assocClass. But for sfcb we get rid of an HE> unnecessary provider call. What do you think ? Yes, and it also eliminates the need to add an additional registration for each prefix we support, which is a good thing. Thanks Heidi! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Tue Dec 4 14:49:25 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Tue, 04 Dec 2007 10:49:25 -0400 Subject: [Libvirt-cim] [PATCH] Add patching guidelines to site Message-ID: <1a3e2e6e3ec15d8f600e.1196783365@wulfgar.pok.ibm.com> # HG changeset patch # User Jay Gagnon # Date 1196783327 18000 # Node ID 1a3e2e6e3ec15d8f600eb21477e18b6a48ccb2df # Parent d182b5a3324feb2d8403d995f8208f8e0057aa6d Add patching guidelines to site. Signed-off-by: Jay Gagnon diff -r d182b5a3324f -r 1a3e2e6e3ec1 doc/Makefile.am --- a/doc/Makefile.am Mon Dec 03 11:22:46 2007 -0500 +++ b/doc/Makefile.am Tue Dec 04 10:48:47 2007 -0500 @@ -5,6 +5,7 @@ WEB_PAGES = index.html \ downloads.html \ intro.html \ news.html \ + patches.html \ platforms.html \ schema.html diff -r d182b5a3324f -r 1a3e2e6e3ec1 doc/libvirt-cim.html --- a/doc/libvirt-cim.html Mon Dec 03 11:22:46 2007 -0500 +++ b/doc/libvirt-cim.html Tue Dec 04 10:48:47 2007 -0500 @@ -57,6 +57,183 @@ tarball or zip file snapshot of the repository. +

+ +

Patches

+ +

To submit patches to libvirt-cim, you must follow the DCO process, outlined +below:

+ +

Developer's Certificate of Origin 1.1

+

By making a contribution to this project, I certify that:

+
    +
  1. +

    + The contribution was created in whole or in part by me and I + have the right to submit it under the open source license indicated in + the file; or +

    +
  2. +
  3. +

    + The contribution is based upon previous work that, to the best of my + knowledge, is covered under an appropriate open source license and I have the + right under that license to submit that work with modifications, whether + created in whole or in part by me, under the same open source license + (unless I am permitted to submit under a different license), as indicated in + the file; or +

    +
  4. +
  5. +

    + The contribution was provided directly to me by some other person who + certified (1), (2) or (3) and I have not modified it. +

    +
  6. +
  7. +

    + I understand and agree that this project and the contribution are public and + that a record of the contribution (including all personal information I + submit with it, including my sign-off) is maintained indefinitely and may be + redistributed consistent with this project or the open source license(s) + involved. +

    +
  8. +
+ +

then you just add a line saying

+ +

+ Signed-off-by: Random J Developer <random at developer.example.org> +

+ +

using your real name (sorry, no pseudonyms or anonymous contributions.)

+ +

Guidelines for Submitting Patches.

+

+ Patches should be submitted using Mercurial's patchbomb extension, and we + recommend using the queues extension as well. On top of that, we have some + guidelines you should follow when submitting patches. This makes reviewing + patches easier, which in turns improves the chances of your patch being + accepted in a timely fashion. +

+

+ For help on how to use the patchbomb extension, see + Section 14.4 of + Distributed revision control with Mercurial. +

+

+ For help on the queues extension, see + Chapter 12. +

+ +

Single Patches:

+
    +
  1. +

    + When you add a patch to the queue you have an idea of where you're going with + it, and the commit message should reflect that. Be specific. Avoid just + saying something like, "Various fixes to AllocationCapabilities." Add a list + of what was actually fixed, like, "Add EnumInstanceNames support," and, + "Eliminate duplicate instances." +

    +
  2. +
  3. +

    + The first line of your commit message will be the subject of the patch email + when you send it out, so write it like a subject. Keep it short and to the + point, then start a new line and feel free to be as verbose as you need to + be. The entire commit message will be included in the patch. +

    +
  4. +
  5. +

    + Stay on task with a patch. If you notice other problems while you are + working on a patch, and they are not most definitely specific to your patch, + they should be another patch. The same goes for nitpicking. While it might + be only a line or two here and there that is off track, this is actually one + of the easiest ways to make a patch difficult to review. All the trivial + changes hide what is really going on. Make the unrelated changes a new + patch or don't make them at all. +

    +
  6. +
  7. +

    + If your patch addresses a strange issue or a rare edge case that the + reviewers are unlikely to be familiar with, make sure the commit message + include some example testcase with results, so the reviewers can verify + your patch more quickly. +

    +
  8. +
  9. +

    + Before you email, export. If you have a patch called "alloc_fixes", which + would be emailed with "hg email alloc_fixes", you should first run "hg export + alloc_fixes". This lets you review your patch. Does it have any typos in + the comments? Did you accidentally include an irrelevant change? Is your + commit message still accurate and useful? This is the single biggest step in + ensuring you have a good patch. +

    +
  10. +
  11. +

    + If your patch needs to be reworked and resent, prepend a "version number" to + the first line of the commit message. For example, "Add EnumInstance to + RASD," becomes "#2 Add EnumInstance to RASD." This helps mail readers thread + discussions correctly and helps maintainers know they are applying the right + version of your patch. At the end of the commit message, explain what is + different from one version to the next. Nobody likes having to diff a diff. +

    +
  12. +
  13. +

    + If your patch depends on a patch that exists on the mailing list but not in + the tree, it is okay to send your patch to the list as long as your commit + message mentions the dependency. It is also a good idea to import the + patch into your tree before you make your patch. For example, a new patch + called "cu_statusf API change" is on the list, and your patch needs the new + API. Save the email (no need to trim headers) as api_change.eml, then do + "hg qimport api_change.eml" and "hg qpush" so that the patch is applied to + your tree. Now write your patch on top of it. You should still indicate + the dependency in your commit message. +

  14. +
+ +

Patchsets:

+
    +
  1. +

    + When you send a group of patches, Mercurial's email extension will create a + "header" email. Make the subject and body of that email meaningful, so we + know how the patches relate. It's easy to say, "Each patch has a commit + message, it's obvious how they work together," but the rest of the list + usually won't agree with that. If the commit messages for each patch are + good, you shouldn't need more than a sentence or two to tie them all + together, but you do need it. +

    +
  2. +
  3. +

    + If any of your patches are rejected and you rework them, resend the entire + set. This prevents things like, "So use patch 1 of 4 from the set I sent + yesterday, 2 and 3 of 4 from the patch I sent an hour later, and patch 4 + of 4 from today." +

    +
  4. +
  5. +

    + If you resend a patchset, apply part (6) of the Single Patches guidelines to + your "Patch [0 of 3]" header email, for all the same reasons. +

    +
  6. +
+ +

Questions/Comments on the Guidelines should be directed to:

+

+ Jay Gagnon + grendel at linux.vnet.ibm.com +
+ Patch Compliance Officer

Schema

diff -r d182b5a3324f -r 1a3e2e6e3ec1 doc/site.xsl --- a/doc/site.xsl Mon Dec 03 11:22:46 2007 -0500 +++ b/doc/site.xsl Tue Dec 04 10:48:47 2007 -0500 @@ -50,6 +50,9 @@ schema.html + + + patches.html unknown.html From kaitlin at linux.vnet.ibm.com Tue Dec 4 15:53:25 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 07:53:25 -0800 Subject: [Libvirt-cim] [PATCH 0 of 9] Reorganized association provider registration In-Reply-To: <87hciy1nfy.fsf@theine.beaverton.ibm.com> References: <475435BB.6070902@linux.vnet.ibm.com> <87fxyj4sjh.fsf@theine.beaverton.ibm.com> <4754475A.6010102@linux.vnet.ibm.com> <4755492C.1070409@linux.vnet.ibm.com> <87hciy1nfy.fsf@theine.beaverton.ibm.com> Message-ID: <475577F5.30202@linux.vnet.ibm.com> Dan Smith wrote: > HE> Yes, for Pegasus, but not for sfcb - sfcb calls the association > HE> provider only once, with the client's assocClass > HE> (e.g. CIM_SystemDevice), while Pegasus manipulates assocClass to > HE> fit the subclass' association name (Xen_SystemDevice and > HE> KVM_SystemDevice) and calls the provider for each subclass. > > Ah, okay. Hmm, that's unfortunate that they behave so differently. > > So, if you resolve the association with an assocClass of CIM_Foo on > sfcb, the provider handler actually sees CIM_Foo as the assocClass, > per my testing just now. So we need to make sure that we don't use > the assocClass (or resultClass) as the target of a > connect_by_classname(). Might be obvious, but I just wanted to make > it explicit. > > Oh, both of these points are interesting - I didn't realize sfcb behaves differently (I've never used it). Thanks for bringing up this issue Heidi =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From grendel at linux.vnet.ibm.com Tue Dec 4 15:57:04 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Tue, 04 Dec 2007 10:57:04 -0500 Subject: [Libvirt-cim] [PATCH] Add patching guidelines to site In-Reply-To: <1a3e2e6e3ec15d8f600e.1196783365@wulfgar.pok.ibm.com> References: <1a3e2e6e3ec15d8f600e.1196783365@wulfgar.pok.ibm.com> Message-ID: <475578D0.6020305@linux.vnet.ibm.com> Jay Gagnon wrote: > # HG changeset patch > # User Jay Gagnon > # Date 1196783327 18000 > # Node ID 1a3e2e6e3ec15d8f600eb21477e18b6a48ccb2df > # Parent d182b5a3324feb2d8403d995f8208f8e0057aa6d > Add patching guidelines to site. > > Signed-off-by: Jay Gagnon > > > This also serves as a reminder that we haven't actually committed my patch for doc/SubmittingPatches. :) Also, I'll double-check this but I think I still need to send out the equivalent patch for libcmpiutil's doc/SubmittingPatches. -- -Jay From danms at us.ibm.com Tue Dec 4 16:09:34 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:09:34 -0800 Subject: [Libvirt-cim] [PATCH] Add patching guidelines to site In-Reply-To: <475578D0.6020305@linux.vnet.ibm.com> (Jay Gagnon's message of "Tue, 04 Dec 2007 10:57:04 -0500") References: <1a3e2e6e3ec15d8f600e.1196783365@wulfgar.pok.ibm.com> <475578D0.6020305@linux.vnet.ibm.com> Message-ID: <871wa21lxd.fsf@theine.beaverton.ibm.com> JG> This also serves as a reminder that we haven't actually committed JG> my patch for doc/SubmittingPatches. :) Actually, I just committed it with the web patch:) JG> Also, I'll double-check this but I think I still need to send out JG> the equivalent patch for libcmpiutil's doc/SubmittingPatches. You can if you want, but I think the libvirt-cim version probably covers us for now, and it would just be duplicate information. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Tue Dec 4 16:13:49 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:13:49 -0800 Subject: [Libvirt-cim] [PATCH 3 of 6] Add VirtualSystemMigrationService In-Reply-To: <4754B595.6080506@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 03 Dec 2007 18:04:05 -0800") References: <5ba311c0a725a603bb0e.1196711788@theine> <4754B333.4000404@linux.vnet.ibm.com> <87lk8b2pdf.fsf@theine.beaverton.ibm.com> <4754B595.6080506@linux.vnet.ibm.com> Message-ID: <87wsruzbcy.fsf@theine.beaverton.ibm.com> KR> Could you also include instructions on testing migration? It KR> seems difficult to do via wbemcli - I haven't tested a method KR> provider before. I use the following xml with wbemcat or wbemexec to make the method call: Xen_VirtualSystemMigrationService foo.bar.com Xen_ComputerSystem pv0 localhost You'll need to change "pv0" to the name of a valid domain, and the "localhost" to a valid destination host (or leave it as localhost to test on loopback). Note that unless you have a key setup, you'll need to type root's password on the CIMOM's stdin. You should be able to tweak the above to test the IsMigratable flavor as well. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Tue Dec 4 16:16:00 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Tue, 04 Dec 2007 11:16:00 -0500 Subject: [Libvirt-cim] [PATCH] Add patching guidelines to site In-Reply-To: <871wa21lxd.fsf@theine.beaverton.ibm.com> References: <1a3e2e6e3ec15d8f600e.1196783365@wulfgar.pok.ibm.com> <475578D0.6020305@linux.vnet.ibm.com> <871wa21lxd.fsf@theine.beaverton.ibm.com> Message-ID: <47557D40.2020601@linux.vnet.ibm.com> Dan Smith wrote: > JG> This also serves as a reminder that we haven't actually committed > JG> my patch for doc/SubmittingPatches. :) > > Actually, I just committed it with the web patch:) > Cools > JG> Also, I'll double-check this but I think I still need to send out > JG> the equivalent patch for libcmpiutil's doc/SubmittingPatches. > > You can if you want, but I think the libvirt-cim version probably > covers us for now, and it would just be duplicate information. > Okay, in that case I won't bother. We can always do it later if somebody says we have to. -- -Jay From danms at us.ibm.com Tue Dec 4 15:56:02 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:56:02 -0700 Subject: [Libvirt-cim] [PATCH 0 of 6] #2 Add migration support Message-ID: Changes: - Added VirtualSystemIsMigratableTo*() methods - Fixed up reported issues There is a blank migratable check still, and I still need to do the MigrationSettingData class, but I'd like to get this into the tree before I do. From danms at us.ibm.com Tue Dec 4 15:56:04 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:56:04 -0700 Subject: [Libvirt-cim] [PATCH 2 of 6] Add VirtualSystemMigrationCapabilties build support In-Reply-To: Message-ID: <853bc758cb198acef26f.1196787364@theine> # HG changeset patch # User Dan Smith # Date 1196787215 28800 # Node ID 853bc758cb198acef26fb916fa913108ef50a3f8 # Parent 4a7e5f2cbb2301be1421491d1ba03870983af27f Add VirtualSystemMigrationCapabilties build support Signed-off-by: Dan Smith diff -r 4a7e5f2cbb23 -r 853bc758cb19 Makefile.am --- a/Makefile.am Tue Dec 04 08:53:32 2007 -0800 +++ b/Makefile.am Tue Dec 04 08:53:35 2007 -0800 @@ -33,7 +33,8 @@ MOFS = \ schema/ResourceAllocationFromPool.mof \ schema/ElementAllocatedFromPool.mof \ schema/HostedService.mof \ - schema/ElementSettingData.mof + schema/ElementSettingData.mof \ + schema/VSMigrationCapabilities.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -72,7 +73,8 @@ REGS = \ schema/ResourceAllocationFromPool.registration \ schema/ElementAllocatedFromPool.registration \ schema/HostedService.registration \ - schema/ElementSettingData.registration + schema/ElementSettingData.registration \ + schema/VSMigrationCapabilities.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 4a7e5f2cbb23 -r 853bc758cb19 schema/VSMigrationCapabilities.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationCapabilities.mof Tue Dec 04 08:53:35 2007 -0800 @@ -0,0 +1,17 @@ +// Copyright IBM Corp. 2007 + +class Virt_VirtualSystemMigrationCapabilities : CIM_Capabilities { + + uint16 DestinationHostFormatsSupported[]; + + uint16 SynchronousMethodsSupported[]; + + uint16 AsynchronousMethodsSupported[]; + +}; + +class Xen_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { +}; + +class KVM_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { +}; diff -r 4a7e5f2cbb23 -r 853bc758cb19 schema/VSMigrationCapabilities.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationCapabilities.registration Tue Dec 04 08:53:35 2007 -0800 @@ -0,0 +1,4 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance +KVM_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance \ No newline at end of file diff -r 4a7e5f2cbb23 -r 853bc758cb19 src/Makefile.am --- a/src/Makefile.am Tue Dec 04 08:53:32 2007 -0800 +++ b/src/Makefile.am Tue Dec 04 08:53:35 2007 -0800 @@ -50,7 +50,8 @@ provider_LTLIBRARIES = libVirt_ComputerS libVirt_ResourceAllocationFromPool.la \ libVirt_ElementAllocatedFromPool.la \ libVirt_HostedService.la \ - libVirt_ElementSettingData.la + libVirt_ElementSettingData.la \ + libVirt_VSMigrationCapabilities.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_Device_la_SOURCES = Virt_Device.c @@ -138,3 +139,5 @@ libVirt_ElementSettingData_la_DEPENDENCI libVirt_ElementSettingData_la_DEPENDENCIES = libVirt_VSSD.la libVirt_RASD.la libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c libVirt_ElementSettingData_la_LIBADD = -lVirt_VSSD -lVirt_RASD + +libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c \ No newline at end of file From danms at us.ibm.com Tue Dec 4 15:56:03 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:56:03 -0700 Subject: [Libvirt-cim] [PATCH 1 of 6] Add VirtualSystemMigrationCapabilities In-Reply-To: Message-ID: <4a7e5f2cbb2301be1421.1196787363@theine> # HG changeset patch # User Dan Smith # Date 1196787212 28800 # Node ID 4a7e5f2cbb2301be1421491d1ba03870983af27f # Parent 32b2c8519573142f2b3176c40501b0ca0c305a7c Add VirtualSystemMigrationCapabilities Changes: - Fixed array size for async methods - Added sync methods Signed-off-by: Dan Smith diff -r 32b2c8519573 -r 4a7e5f2cbb23 src/Virt_VSMigrationCapabilities.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationCapabilities.c Tue Dec 04 08:53:32 2007 -0800 @@ -0,0 +1,192 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include + +#include +#include +#include + +#include "libcmpiutil.h" +#include "misc_util.h" +#include "std_instance.h" + +#include "Virt_VSMigrationCapabilities.h" + +const static CMPIBroker *_BROKER; + +#define SVPC_MIG_MVSTH 2 +#define SVPC_MIG_MVSTS 3 +#define SVPC_MIG_CVSIMTH 4 +#define SVPC_MIG_CVSIMTS 5 + +static CMPIStatus set_method_properties(const CMPIBroker *broker, + CMPIInstance *inst) +{ + CMPIArray *array; + CMPIStatus s; + uint16_t val; + + array = CMNewArray(broker, 2, CMPI_INTEGER, &s); + if (s.rc != CMPI_RC_OK) + return s; + + val = SVPC_MIG_MVSTH; + CMSetArrayElementAt(array, 0, (CMPIValue *)&val, CMPI_uint16); + + val = SVPC_MIG_MVSTS; + CMSetArrayElementAt(array, 1, (CMPIValue *)&val, CMPI_uint16); + + CMSetProperty(inst, "AsynchronousMethodsSupported", + (CMPIValue *)&array, CMPI_ARRAY); + + + array = CMNewArray(broker, 2, CMPI_INTEGER, &s); + if (s.rc != CMPI_RC_OK) + return s; + + val = SVPC_MIG_CVSIMTH; + CMSetArrayElementAt(array, 0, (CMPIValue *)&val, CMPI_uint16); + + val = SVPC_MIG_CVSIMTS; + CMSetArrayElementAt(array, 1, (CMPIValue *)&val, CMPI_uint16); + + CMSetProperty(inst, "SynchronousMethodsSupported", + (CMPIValue *)&array, CMPI_ARRAY); + + CMSetStatus(&s, CMPI_RC_OK); + + return s; +} + +CMPIStatus get_migration_caps(const CMPIObjectPath *ref, + CMPIInstance **_inst, + const CMPIBroker *broker) +{ + CMPIInstance *inst; + CMPIStatus s; + + inst = get_typed_instance(broker, + CLASSNAME(ref), + "VirtualSystemMigrationCapabilities", + NAMESPACE(ref)); + if (inst == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get instance for %s", CLASSNAME(ref)); + return s; + } + + CMSetProperty(inst, "InstanceID", + (CMPIValue *)"MigrationCapabilities", CMPI_chars); + + s = set_method_properties(broker, inst); + + if (s.rc == CMPI_RC_OK) + *_inst = inst; + + return s; +} + +static CMPIStatus return_vsmc(const CMPIObjectPath *ref, + const CMPIResult *results, + bool name_only) +{ + CMPIInstance *inst; + CMPIStatus s; + + s = get_migration_caps(ref, &inst, _BROKER); + + if (s.rc == CMPI_RC_OK) { + if (name_only) + cu_return_instance_name(results, inst); + else + CMReturnInstance(results, inst); + } + + return s; +} + +static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref) +{ + return return_vsmc(ref, results, true); +} + +static CMPIStatus EnumInstances(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + + return return_vsmc(ref, results, false); +} + + +static CMPIStatus GetInstance(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + CMPIInstance *inst; + CMPIStatus s; + const char *prop; + + s = get_migration_caps(ref, &inst, _BROKER); + if (s.rc != CMPI_RC_OK) + return s; + + prop = cu_compare_ref(ref, inst); + if (prop != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (%s)", prop); + } else { + CMReturnInstance(results, inst); + } + + return s; +} + +DEFAULT_CI(); +DEFAULT_MI(); +DEFAULT_DI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, Virt_VSMC, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r 32b2c8519573 -r 4a7e5f2cbb23 src/Virt_VSMigrationCapabilities.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationCapabilities.h Tue Dec 04 08:53:32 2007 -0800 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ + +CMPIStatus get_migration_caps(const CMPIObjectPath *reference, + CMPIInstance **_inst, + const CMPIBroker *broker); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + From danms at us.ibm.com Tue Dec 4 15:56:08 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:56:08 -0700 Subject: [Libvirt-cim] [PATCH 6 of 6] Add ElementCapabilities support for VirtualSystemMigrationCapabilities In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1196787356 28800 # Node ID bde7af5c35fa76a58a825817f181d2e6a08096ee # Parent b71790bb1ff44e6cbd8eebf28caee6ce3c21a340 Add ElementCapabilities support for VirtualSystemMigrationCapabilities Signed-off-by: Dan Smith diff -r b71790bb1ff4 -r bde7af5c35fa src/Makefile.am --- a/src/Makefile.am Tue Dec 04 08:55:55 2007 -0800 +++ b/src/Makefile.am Tue Dec 04 08:55:56 2007 -0800 @@ -88,12 +88,13 @@ libVirt_ElementConformsToProfile_la_LIBA libVirt_EnabledLogicalElementCapabilities_la_SOURCES = Virt_EnabledLogicalElementCapabilities.c -libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la +libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \ -lVirt_EnabledLogicalElementCapabilities \ -lVirt_ComputerSystem \ - -lVirt_HostSystem + -lVirt_HostSystem \ + -lVirt_VSMigrationCapabilities libVirt_AllocationCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c diff -r b71790bb1ff4 -r bde7af5c35fa src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Tue Dec 04 08:55:55 2007 -0800 +++ b/src/Virt_ElementCapabilities.c Tue Dec 04 08:55:56 2007 -0800 @@ -37,6 +37,7 @@ #include "Virt_EnabledLogicalElementCapabilities.h" #include "Virt_ComputerSystem.h" #include "Virt_HostSystem.h" +#include "Virt_VSMigrationCapabilities.h" /* Associate an XXX_Capabilities to the proper XXX_ManagedElement. * @@ -70,6 +71,11 @@ static CMPIStatus sys_to_cap(const CMPIO s = get_vsm_cap(_BROKER, ref, &inst); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); + + s = get_migration_caps(ref, &inst, _BROKER); + if (s.rc == CMPI_RC_OK) + inst_list_add(list, inst); + out: return s; } @@ -249,8 +255,10 @@ char* host_system[] = { char* virtual_system_management_capabilities[] = { "Xen_VirtualSystemManagementCapabilities", + "Xen_VirtualSystemMigrationCapabilities", "KVM_VirtualSystemManagementCapabilities", - NULL + "KVM_VirtualSystemMigrationCapabilities", + NULL, }; struct std_assoc system_to_vsm_cap = { From danms at us.ibm.com Tue Dec 4 15:56:06 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:56:06 -0700 Subject: [Libvirt-cim] [PATCH 4 of 6] Add VirtualSystemMigrationService In-Reply-To: Message-ID: <058dc68a17d0303c8272.1196787366@theine> # HG changeset patch # User Dan Smith # Date 1196787286 28800 # Node ID 058dc68a17d0303c8272f9b2c52916f783ba3ae8 # Parent 58bd9f06204f69bbdbe3724cf45b845a58dedd4a Add VirtualSystemMigrationService Changes: - Added rough IsMigratable support - Added method return code support - Fixed unnecessary status - Fixed conn instead of dconn in failure path Signed-off-by: Dan Smith diff -r 58bd9f06204f -r 058dc68a17d0 src/Virt_VSMigrationService.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationService.c Tue Dec 04 08:54:46 2007 -0800 @@ -0,0 +1,517 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include + +#include + +#include +#include +#include + +#include "libcmpiutil.h" +#include "misc_util.h" +#include "std_instance.h" +#include "std_invokemethod.h" + +#include "Virt_VSMigrationService.h" + +#define METHOD_RETURN(r, v) do { \ + uint32_t rc = v; \ + CMReturnData(r, (CMPIValue *)&rc, CMPI_uint32); \ + } while (0); + +const static CMPIBroker *_BROKER; + +static const char *transport_from_ref(const CMPIObjectPath *ref) +{ + const char *cn; + + cn = CLASSNAME(ref); + + if (STARTS_WITH(cn, "Xen")) + return "xen+ssh"; + else if (STARTS_WITH(cn, "KVM")) + return "qemu+ssh"; + else + return NULL; +} + +static char *dest_uri(const CMPIObjectPath *ref, + const char *dest) +{ + char *uri; + const char *tport = NULL; + + tport = transport_from_ref(ref); + if (tport == NULL) { + CU_DEBUG("Failed to get transport for %s", CLASSNAME(ref)); + return NULL; + } + + if (asprintf(&uri, "%s://%s/", tport, dest) == -1) + uri = NULL; + + return uri; +} + +static CMPIStatus check_caps(virConnectPtr conn, virConnectPtr dconn) +{ + return (CMPIStatus){CMPI_RC_OK, NULL}; +} + +static CMPIStatus check_hver(virConnectPtr conn, virConnectPtr dconn) +{ + CMPIStatus s; + unsigned long local; + unsigned long remote; + + if (virConnectGetVersion(conn, &local)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get local Hypervisor version"); + goto out; + } + + if (virConnectGetVersion(dconn, &remote)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get remote hypervisor version"); + goto out; + } + + if (remote >= local) { + CU_DEBUG("Version check OK (%lu >= %lu)", remote, local); + CMSetStatus(&s, CMPI_RC_OK); + } else { + CU_DEBUG("Version check FAILED (%lu < %lu)", remote, local); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Remote hypervisor is older than local (%lu < %lu)", + remote, local); + } + + CMSetStatus(&s, CMPI_RC_OK); + + out: + return s; +} + +static CMPIStatus vs_migratable(const CMPIObjectPath *ref, + const char *domain, + const char *destination, + const CMPIResult *results) +{ + CMPIStatus s; + char *uri = NULL; + virConnectPtr conn = NULL; + virConnectPtr dconn = NULL; + uint32_t retcode = 1; + + uri = dest_uri(ref, destination); + if (uri == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to construct a valid libvirt URI"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + goto out; + + dconn = virConnectOpen(uri); + if (dconn == NULL) { + CU_DEBUG("Failed to connect to remote host (%s)", uri); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to connect to remote host (%s)", uri); + goto out; + } + + s = check_hver(conn, dconn); + if (s.rc != CMPI_RC_OK) + goto out; + + s = check_caps(conn, dconn); + if (s.rc != CMPI_RC_OK) + goto out; + + retcode = 0; + CMSetStatus(&s, CMPI_RC_OK); + + out: + CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); + + free(uri); + virConnectClose(conn); + virConnectClose(dconn); + + return s; +} + +static CMPIStatus vs_migratable_host(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + CMPIStatus s; + const char *dhost = NULL; + CMPIObjectPath *system; + const char *name = NULL; + + cu_get_str_arg(argsin, "DestinationHost", &dhost); + cu_get_ref_arg(argsin, "ComputerSystem", &system); + + if (cu_get_str_path(system, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + + return vs_migratable(ref, name, dhost, results); +} + +static CMPIStatus vs_migratable_system(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + CMPIStatus s; + CMPIObjectPath *dsys; + CMPIObjectPath *sys; + const char *dname; + const char *name; + + cu_get_ref_arg(argsin, "DestinationSystem", &dsys); + cu_get_ref_arg(argsin, "ComputerSystem", &sys); + + if (cu_get_str_path(dsys, "Name", &dname) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in DestinationSystem"); + METHOD_RETURN(results, 1); + return s; + } + + if (cu_get_str_path(sys, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + + return vs_migratable(ref, name, dname, results); +} + +static CMPIStatus migrate_vs(const CMPIObjectPath *ref, + const char *domain, + const char *destination, + const CMPIResult *results) +{ + CMPIStatus s; + virConnectPtr conn = NULL; + virConnectPtr dconn = NULL; + virDomainPtr dom = NULL; + virDomainPtr ddom = NULL; + char *uri = NULL; + uint32_t retcode = 1; + + uri = dest_uri(ref, destination); + if (uri == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to construct a valid libvirt URI"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + goto out; + + dom = virDomainLookupByName(conn, domain); + if (dom == NULL) { + CU_DEBUG("Failed to lookup `%s'", domain); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to lookup domain `%s'", domain); + goto out; + } + + dconn = virConnectOpen(uri); + if (dconn == NULL) { + CU_DEBUG("Failed to connect to remote host (%s)", uri); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to connect to remote host (%s)", uri); + goto out; + } + + CU_DEBUG("Migrating %s -> %s", domain, uri); + + ddom = virDomainMigrate(dom, dconn, VIR_MIGRATE_LIVE, NULL, NULL, 0); + if (ddom == NULL) { + CU_DEBUG("Migration failed"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Migration Failed"); + goto out; + } + + CU_DEBUG("Migration succeeded"); + retcode = 0; + CMSetStatus(&s, CMPI_RC_OK); + + out: + CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); + + free(uri); + virDomainFree(dom); + virDomainFree(ddom); + virConnectClose(conn); + virConnectClose(dconn); + + return s; +} + +static CMPIStatus migrate_vs_host(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + CMPIStatus s; + const char *dhost = NULL; + CMPIObjectPath *system; + const char *name = NULL; + + cu_get_str_arg(argsin, "DestinationHost", &dhost); + cu_get_ref_arg(argsin, "ComputerSystem", &system); + + if (cu_get_str_path(system, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + + return migrate_vs(ref, name, dhost, results); +} + +static CMPIStatus migrate_vs_system(CMPIMethodMI *self, + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + CMPIStatus s; + CMPIObjectPath *dsys; + CMPIObjectPath *sys; + const char *dname; + const char *name; + + cu_get_ref_arg(argsin, "DestinationSystem", &dsys); + cu_get_ref_arg(argsin, "ComputerSystem", &sys); + + if (cu_get_str_path(dsys, "Name", &dname) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in DestinationSystem"); + METHOD_RETURN(results, 1); + return s; + } + + if (cu_get_str_path(sys, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing key (Name) in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + + return migrate_vs(ref, name, dname, results); +} + +static struct method_handler vsimth = { + .name = "VirtualSystemIsMigratableToHost", + .handler = vs_migratable_host, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationHost", CMPI_string}, + ARG_END + } +}; + +static struct method_handler vsimts = { + .name = "VirtualSystemIsMigratableToSystem", + .handler = vs_migratable_system, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationSystem", CMPI_ref}, + ARG_END + } +}; + +static struct method_handler mvsth = { + .name = "MigrateVirtualSystemToHost", + .handler = migrate_vs_host, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationHost", CMPI_string}, + ARG_END + } +}; + +static struct method_handler mvsts = { + .name = "MigrateVirtualSystemToSystem", + .handler = migrate_vs_system, + .args = {{"ComputerSystem", CMPI_ref}, + {"DestinationSystem", CMPI_ref}, + ARG_END + } +}; + +static struct method_handler *my_handlers[] = { + &vsimth, + &vsimts, + &mvsth, + &mvsts, + NULL +}; + +STDIM_MethodMIStub(, Virt_VSMigrationService, _BROKER, + libvirt_cim_init(), my_handlers); + +CMPIStatus get_migration_service(const CMPIObjectPath *ref, + CMPIInstance **_inst, + const CMPIBroker *broker) +{ + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + inst = get_typed_instance(broker, + CLASSNAME(ref), + "VirtualSystemMigrationService", + NAMESPACE(ref)); + if (inst == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get instance for %s", CLASSNAME(ref)); + return s; + } + + CMSetProperty(inst, "Name", + (CMPIValue *)"MigrationService", CMPI_chars); + + *_inst = inst; + + return s; +} + +static CMPIStatus return_vsms(const CMPIObjectPath *ref, + const CMPIResult *results, + bool name_only) +{ + CMPIInstance *inst; + CMPIStatus s; + + s = get_migration_service(ref, &inst, _BROKER); + if (s.rc == CMPI_RC_OK) { + if (name_only) + cu_return_instance_name(results, inst); + else + CMReturnInstance(results, inst); + } + + return s; +} + +static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref) +{ + return return_vsms(ref, results, true); +} + +static CMPIStatus EnumInstances(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + + return return_vsms(ref, results, false); +} + + +static CMPIStatus GetInstance(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + CMPIInstance *inst; + CMPIStatus s; + const char *prop; + + s = get_migration_service(ref, &inst, _BROKER); + if (s.rc != CMPI_RC_OK) + return s; + + prop = cu_compare_ref(ref, inst); + if (prop != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (%s)", prop); + } else { + CMReturnInstance(results, inst); + } + + return s; +} + +DEFAULT_CI(); +DEFAULT_MI(); +DEFAULT_DI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, Virt_VSMigrationService, + _BROKER, + libvirt_cim_init()); +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r 58bd9f06204f -r 058dc68a17d0 src/Virt_VSMigrationService.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_VSMigrationService.h Tue Dec 04 08:54:46 2007 -0800 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ + +CMPIStatus get_migration_service(const CMPIObjectPath *reference, + CMPIInstance **_inst, + const CMPIBroker *broker); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + From danms at us.ibm.com Tue Dec 4 15:56:05 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:56:05 -0700 Subject: [Libvirt-cim] [PATCH 3 of 6] Add build support for VirtualSystemMigrationService In-Reply-To: Message-ID: <58bd9f06204f69bbdbe3.1196787365@theine> # HG changeset patch # User Dan Smith # Date 1196787215 28800 # Node ID 58bd9f06204f69bbdbe3724cf45b845a58dedd4a # Parent 853bc758cb198acef26fb916fa913108ef50a3f8 Add build support for VirtualSystemMigrationService Signed-off-by: Dan Smith diff -r 853bc758cb19 -r 58bd9f06204f Makefile.am --- a/Makefile.am Tue Dec 04 08:53:35 2007 -0800 +++ b/Makefile.am Tue Dec 04 08:53:35 2007 -0800 @@ -34,7 +34,8 @@ MOFS = \ schema/ElementAllocatedFromPool.mof \ schema/HostedService.mof \ schema/ElementSettingData.mof \ - schema/VSMigrationCapabilities.mof + schema/VSMigrationCapabilities.mof \ + schema/VSMigrationService.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -74,7 +75,8 @@ REGS = \ schema/ElementAllocatedFromPool.registration \ schema/HostedService.registration \ schema/ElementSettingData.registration \ - schema/VSMigrationCapabilities.registration + schema/VSMigrationCapabilities.registration \ + schema/VSMigrationService.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 853bc758cb19 -r 58bd9f06204f schema/VSMigrationService.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationService.mof Tue Dec 04 08:53:35 2007 -0800 @@ -0,0 +1,41 @@ +// Copyright IBM Corp. 2007 + +// Placeholder definition until schema is available upstream + +class CIM_VirtualSystemMigrationService : CIM_Service { + uint32 VirtualSystemIsMigratableToHost( + [Out] + CIM_ConcreteJob REF Job, + [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] + string NewResourceSettingData[], + [In, EmbeddedInstance("CIM_SettingData")] + string MigrationSettingData, + [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] + string NewSystemSettingData, + [In] + CIM_ComputerSystem REF ComputerSystem, + [In] + string DestinationHost); + + uint32 MigrateVirtualSystemToHost( + [Out] + CIM_ConcreteJob REF Job, + [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] + string NewResourceSettingData[], + [In, EmbeddedInstance("CIM_SettingData")] + string MigrationSettingData, + [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] + string NewSystemSettingData, + [In] + CIM_ComputerSystem REF ComputerSystem, + [In] + string DestinationHost); + +}; + +class Xen_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { +}; + +class KVM_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { +}; + diff -r 853bc758cb19 -r 58bd9f06204f schema/VSMigrationService.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/VSMigrationService.registration Tue Dec 04 08:53:35 2007 -0800 @@ -0,0 +1,4 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_VirtualSystemMigrationService root/virt Virt_VSMigrationService Virt_VSMigrationService instance method +KVM_VirtualSystemMigrationService root/virt Virt_VSMigrationService Virt_VSMigrationService instance method \ No newline at end of file diff -r 853bc758cb19 -r 58bd9f06204f src/Makefile.am --- a/src/Makefile.am Tue Dec 04 08:53:35 2007 -0800 +++ b/src/Makefile.am Tue Dec 04 08:53:35 2007 -0800 @@ -51,7 +51,8 @@ provider_LTLIBRARIES = libVirt_ComputerS libVirt_ElementAllocatedFromPool.la \ libVirt_HostedService.la \ libVirt_ElementSettingData.la \ - libVirt_VSMigrationCapabilities.la + libVirt_VSMigrationCapabilities.la \ + libVirt_VSMigrationService.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_Device_la_SOURCES = Virt_Device.c @@ -140,4 +141,6 @@ libVirt_ElementSettingData_la_SOURCES = libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c libVirt_ElementSettingData_la_LIBADD = -lVirt_VSSD -lVirt_RASD -libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c \ No newline at end of file +libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c + +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c \ No newline at end of file From danms at us.ibm.com Tue Dec 4 15:56:07 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Dec 2007 08:56:07 -0700 Subject: [Libvirt-cim] [PATCH 5 of 6] Add HostedService support for VirtualSystemMigrationService In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1196787355 28800 # Node ID b71790bb1ff44e6cbd8eebf28caee6ce3c21a340 # Parent 058dc68a17d0303c8272f9b2c52916f783ba3ae8 Add HostedService support for VirtualSystemMigrationService Signed-off-by: Dan Smith diff -r 058dc68a17d0 -r b71790bb1ff4 src/Makefile.am --- a/src/Makefile.am Tue Dec 04 08:54:46 2007 -0800 +++ b/src/Makefile.am Tue Dec 04 08:55:55 2007 -0800 @@ -133,9 +133,9 @@ libVirt_ElementAllocatedFromPool_la_SOUR libVirt_ElementAllocatedFromPool_la_SOURCES = Virt_ElementAllocatedFromPool.c libVirt_ElementAllocatedFromPool_la_LIBADD = -lVirt_DevicePool -lVirt_Device -libVirt_HostedService_la_DEPENDENCIES = libVirt_VirtualSystemManagementService.la libVirt_ResourcePoolConfigurationService.la +libVirt_HostedService_la_DEPENDENCIES = libVirt_VirtualSystemManagementService.la libVirt_ResourcePoolConfigurationService.la libVirt_VSMigrationService.la libVirt_HostedService_la_SOURCES = Virt_HostedService.c -libVirt_HostedService_la_LIBADD = -lVirt_VirtualSystemManagementService -lVirt_ResourcePoolConfigurationService +libVirt_HostedService_la_LIBADD = -lVirt_VirtualSystemManagementService -lVirt_ResourcePoolConfigurationService -lVirt_VSMigrationService libVirt_ElementSettingData_la_DEPENDENCIES = libVirt_VSSD.la libVirt_RASD.la libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c diff -r 058dc68a17d0 -r b71790bb1ff4 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Tue Dec 04 08:54:46 2007 -0800 +++ b/src/Virt_HostedService.c Tue Dec 04 08:55:55 2007 -0800 @@ -33,6 +33,7 @@ #include "Virt_HostSystem.h" #include "Virt_VirtualSystemManagementService.h" #include "Virt_ResourcePoolConfigurationService.h" +#include "Virt_VSMigrationService.h" const static CMPIBroker *_BROKER; @@ -72,6 +73,12 @@ static CMPIStatus host_to_service(const return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); + + s = get_migration_service(ref, &inst, _BROKER); + if (s.rc != CMPI_RC_OK) + return s; + if (!CMIsNullObject(inst)) + inst_list_add(list, inst); return s; } @@ -116,8 +123,10 @@ char* dependent[] = { char* dependent[] = { "Xen_ResourcePoolConfigurationService", "Xen_VirtualSystemManagementService", + "Xen_VirtualSystemMigrationService", "KVM_ResourcePoolConfigurationService", "KVM_VirtualSystemManagementService", + "KVM_VirtualSystemMigrationService", NULL }; From kaitlin at linux.vnet.ibm.com Tue Dec 4 23:05:13 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 15:05:13 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] ELEC cleanup - remove get_fq_devid() In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1196470485 28800 # Node ID e69c02e79e40056b1d1a4825c048d70355e9cf85 # Parent e6be7823c8e90c1f4b722ce1b33d6d15db123029 ELEC cleanup - remove get_fq_devid(). Removing get_fq_devid() since it's not necessary for building an InstanceID. Since this change causes error1 to be removed, I also renamed error2 to out, which conforms to the style of the other of the providers. Also, having an error2 without an error1 seemed silly. Signed-off-by: Kaitlin Rupert diff -r e6be7823c8e9 -r e69c02e79e40 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 15:32:26 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 16:54:45 2007 -0800 @@ -30,7 +30,6 @@ #include "std_instance.h" #include "misc_util.h" -#include "device_parsing.h" #include "cs_util.h" #include "Virt_EnabledLogicalElementCapabilities.h" @@ -58,24 +57,15 @@ static CMPIStatus set_inst_properties(co CMPIArray *array; uint16_t element; int edit_name = 0; - char *devid; CMSetProperty(inst, "CreationClassName", (CMPIValue *)classname, CMPI_chars); - devid = get_fq_devid((char *)sys_name, "0"); - if (devid == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get full ID"); - goto error1; - } - - CMSetProperty(inst, "InstanceID", (CMPIValue *)devid, CMPI_chars); + CMSetProperty(inst, "InstanceID", (CMPIValue *)sys_name, CMPI_chars); array = CMNewArray(broker, 5, CMPI_uint16, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(array)) - goto error2; + goto out; element = (uint16_t)ENABLED; CMSetArrayElementAt(array, 0, &element, CMPI_uint16); @@ -97,9 +87,7 @@ static CMPIStatus set_inst_properties(co CMSetProperty(inst, "ElementNameEditSupported", (CMPIValue *)&edit_name, CMPI_boolean); - error2: - free(devid); - error1: + out: return s; } From kaitlin at linux.vnet.ibm.com Tue Dec 4 23:05:12 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 15:05:12 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Remove devid-style InstanceID support from ELEC and EC. Message-ID: Removed devid-style InstanceID support from ELEC - this class now uses just the name of domain. This caused a needed update in EC - cap_to_cs() no longer needs to parse devid-style InstanceIDs. Updates: None This is acutally just a resend. Heidi suggested to add connect_by_classname() to return_vsm_cap() in VSMC. However, since this patchset doesn't address changes in VSMC, I'll be sending the VSMC change as a seperate patch. From kaitlin at linux.vnet.ibm.com Tue Dec 4 23:05:14 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 15:05:14 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Removing support for devid-style InstanceID from EC In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1196788236 28800 # Node ID e9e11611dc975a72237a9653b0a4a07ab9b4b4e1 # Parent e69c02e79e40056b1d1a4825c048d70355e9cf85 Removing support for devid-style InstanceID from EC. Since ELEC no longer uses devid-style InstanceID, we need to remove the devid-parsing from cap_to_cs(). Signed-off-by: Kaitlin Rupert diff -r e69c02e79e40 -r e9e11611dc97 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Fri Nov 30 16:54:45 2007 -0800 +++ b/src/Virt_ElementCapabilities.c Tue Dec 04 09:10:36 2007 -0800 @@ -31,7 +31,6 @@ #include "libcmpiutil.h" #include "misc_util.h" #include "std_association.h" -#include "device_parsing.h" #include "Virt_VirtualSystemManagementCapabilities.h" #include "Virt_EnabledLogicalElementCapabilities.h" @@ -119,8 +118,6 @@ static CMPIStatus cap_to_cs(const CMPIOb struct inst_list *list) { const char *inst_id; - char *host; - char *device; CMPIInstance *inst; virConnectPtr conn; CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -129,13 +126,6 @@ static CMPIStatus cap_to_cs(const CMPIOb cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Could not get InstanceID"); - goto error1; - } - - if (!parse_fq_devid(inst_id, &host, &device)) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Could not get system name"); goto error1; } @@ -143,14 +133,12 @@ static CMPIStatus cap_to_cs(const CMPIOb if (s.rc != CMPI_RC_OK) goto error1; - inst = instance_from_name(_BROKER, conn, host, ref); + inst = instance_from_name(_BROKER, conn, inst_id, ref); if (inst) inst_list_add(list, inst); virConnectClose(conn); error1: - free(host); - free(device); return s; } From kaitlin at linux.vnet.ibm.com Tue Dec 4 23:09:48 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 15:09:48 -0800 Subject: [Libvirt-cim] [PATCH] VSMC returns extra instances - add connect_by_classname Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1196809769 28800 # Node ID f83fe9e0ad3648502dcc52eabdb8ebc2c6baf046 # Parent e9e11611dc975a72237a9653b0a4a07ab9b4b4e1 VSMC returns extra instances - add connect_by_classname. VSMC is returning an instance for both KVM and Xen, when only a Xen instance should be returned. Test query: wbemcli ein http://localhost/root/virt:CIM_VirtualSystemManagementCapabilities Signed-off-by: Kaitlin Rupert diff -r e9e11611dc97 -r f83fe9e0ad36 src/Virt_VirtualSystemManagementCapabilities.c --- a/src/Virt_VirtualSystemManagementCapabilities.c Tue Dec 04 09:10:36 2007 -0800 +++ b/src/Virt_VirtualSystemManagementCapabilities.c Tue Dec 04 15:09:29 2007 -0800 @@ -128,6 +128,11 @@ static CMPIStatus return_vsm_cap(const C { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + virConnectPtr conn = NULL; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + goto out; s = get_vsm_cap(_BROKER, ref, &inst); if (s.rc != CMPI_RC_OK) @@ -138,6 +143,8 @@ static CMPIStatus return_vsm_cap(const C else CMReturnInstance(results, inst); out: + virConnectClose(conn); + return s; } From kaitlin at linux.vnet.ibm.com Tue Dec 4 23:00:21 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 15:00:21 -0800 Subject: [Libvirt-cim] [PATCH] SD doesn't return instances in all cases In-Reply-To: <4753CAAB.4050509@linux.vnet.ibm.com> References: <1776beb36f5cffcfad4e.1196461268@elm3b41.beaverton.ibm.com> <874pf374rv.fsf@theine.beaverton.ibm.com> <4753CAAB.4050509@linux.vnet.ibm.com> Message-ID: <4755DC05.7070805@linux.vnet.ibm.com> Heidi Eckhart wrote: >> optimization (correctly) if we decide it's needed. > Now, that you both pick up the filter_results() function, this is a > good time to enter this discussion. I agree that the filter_results() > function is handy and takes away a lot of checking and distinguishing > from the provider. For tiny numbers of returned instances and fast > systems, this will not cause any problems. But we should keep in mind, > that the providers should also scale for a large number of virtual > machines. As Dan already mentioned - this approach will become an > performance issue later. On the other hand its more the responsibility > of the provider - especially for our ones, that handle a lot of > subclasses at one time - to filter the returned instances, as the > responsibility of the generic association logic. So I want to follow > Dan's opinion and keep it for now. But we should add this to our ToDo > list and fix as time allows. I suppose this will mean to reorganize > the providers a bit and I do not expect a huge effort. > I agree - I was concerned about performance when I wrote the filter_results() code. =) It would probably be a good idea to test all of the providers for performance at some point. Since the enum extrinsic functions don't return until all the instances are generate, you could potentially run into some performance issues there as well. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Dec 4 23:05:23 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 15:05:23 -0800 Subject: [Libvirt-cim] [PATCH] VSMC returns extra instances - add connect_by_classname In-Reply-To: References: Message-ID: <4755DD33.8010502@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1196809769 28800 > # Node ID f83fe9e0ad3648502dcc52eabdb8ebc2c6baf046 > # Parent e9e11611dc975a72237a9653b0a4a07ab9b4b4e1 > VSMC returns extra instances - add connect_by_classname. > > VSMC is returning an instance for both KVM and Xen, when only a Xen instance should be returned. > > Test query: > wbemcli ein http://localhost/root/virt:CIM_VirtualSystemManagementCapabilities > > Signed-off-by: Kaitlin Rupert > Heidi, I'm not sure this will solve the problem where wbemein http://localhost/root/virt:CIM_EnabledLogicalElementCapabilities returns incorrect / invalid instances. I think I hit a race condition today that caused connect_by_classname(KVM_<>) to pass even though libvirtd wasn't even running on my test system. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Dec 5 00:26:23 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Dec 2007 16:26:23 -0800 Subject: [Libvirt-cim] [PATCH 0 of 6] #2 Add migration support In-Reply-To: References: Message-ID: <4755F02F.3090005@linux.vnet.ibm.com> Dan Smith wrote: > Changes: > - Added VirtualSystemIsMigratableTo*() methods > - Fixed up reported issues > > There is a blank migratable check still, and I still need to do > the MigrationSettingData class, but I'd like to get this into the > tree before I do. > I haven't had a chance to apply this patch and test, but it looks good from the read through. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:09 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:09 +0200 Subject: [Libvirt-cim] [PATCH 0 of 9] #2 - Reorganized association provider registration Message-ID: The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Diff to patch #1: - clarified patch message - added match_hypervsior_prefix to association's handler functions Tested for sfcb and Pegasus, but encountered a strange behavior with Pegasus. Please can someone try to reproduce this on his/her system ? The following call wbemain -ac CIM_HostedDependency -noverify 'http://pegasus:pegasus at localhost/root/virt:KVM_HostSystem.CreationClassName="KVM_HostSystem",Name="localhost.localdomain"' should return localhost:5988/root/virt:KVM_ResourcePoolConfigurationService.SystemCreationClassName="KVM_HostSystem",SystemName="localhost.localdomain",CreationClassName="KVM_ResourcePoolConfigurationService",Name="RPCS" localhost:5988/root/virt:KVM_VirtualSystemManagementService.SystemCreationClassName="KVM_HostSystem",SystemName="localhost.localdomain",CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service" localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="qemu1" but the returned results for Pegasus depend on the order, in which the providers Virt_HostedDependency and Virt_HostedService have been called. Either localhost:5988/root/virt:KVM_ResourcePoolConfigurationService.SystemCreationClassName="KVM_HostSystem",SystemName="localhost.localdomain",CreationClassName="KVM_ResourcePoolConfigurationService",Name="RPCS" localhost:5988/root/virt:KVM_VirtualSystemManagementService.SystemCreationClassName="KVM_HostSystem",SystemName="localhost.localdomain",CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service" is returned if, Virt_HostedService was called first or localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="qemu1" is returned, if Virt_HostedDependency was called first. Thanks ... Heidi From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:10 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:10 +0200 Subject: [Libvirt-cim] [PATCH 1 of 9] EAFP: Provider registered per subclass In-Reply-To: Message-ID: <6500573879debb5d6086.1196847010@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196844139 -3600 # Node ID 6500573879debb5d6086df84e17d4336090d8e92 # Parent 8140438a647cd53017d79b7036702fc053fe9e9c EAFP: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r 8140438a647c -r 6500573879de schema/ElementAllocatedFromPool.registration --- a/schema/ElementAllocatedFromPool.registration Fri Nov 30 17:21:33 2007 -0800 +++ b/schema/ElementAllocatedFromPool.registration Wed Dec 05 09:42:19 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementAllocatedFromPool root/virt Xen_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association -KVM_ElementAllocatedFromPool root/virt KVM_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association +Xen_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association +KVM_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association diff -r 8140438a647c -r 6500573879de src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Fri Nov 30 17:21:33 2007 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Wed Dec 05 09:42:19 2007 +0100 @@ -61,12 +61,15 @@ static CMPIStatus vdev_to_pool(const CMP struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; uint16_t type; const char *id = NULL; char *poolid = NULL; virConnectPtr conn = NULL; CMPIInstance *pool = NULL; + + if (!match_hypervisor_prefix(ref, info)) + return s; type = class_to_type(ref); if (type == 0) { @@ -196,7 +199,10 @@ static CMPIStatus pool_to_vdev(const CMP struct inst_list *list) { const char *poolid; - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -326,8 +332,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:14 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:14 +0200 Subject: [Libvirt-cim] [PATCH 5 of 9] RAFP: Provider registered per subclass In-Reply-To: Message-ID: <9751a165ebca953b720f.1196847014@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196844142 -3600 # Node ID 9751a165ebca953b720faf81c4fdfd5d0748aa6a # Parent cf48a55a717b1aa79345e95aff6cfec96cbc2d65 RAFP: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r cf48a55a717b -r 9751a165ebca schema/ResourceAllocationFromPool.registration --- a/schema/ResourceAllocationFromPool.registration Wed Dec 05 09:42:22 2007 +0100 +++ b/schema/ResourceAllocationFromPool.registration Wed Dec 05 09:42:22 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourceAllocationFromPool root/virt Xen_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association -KVM_ResourceAllocationFromPool root/virt KVM_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association \ No newline at end of file +Xen_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association +KVM_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association \ No newline at end of file diff -r cf48a55a717b -r 9751a165ebca src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Wed Dec 05 09:42:22 2007 +0100 +++ b/src/Virt_ResourceAllocationFromPool.c Wed Dec 05 09:42:22 2007 +0100 @@ -41,13 +41,16 @@ static CMPIStatus rasd_to_pool(const CMP struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; uint16_t type; const char *id = NULL; char *poolid = NULL; virConnectPtr conn = NULL; struct inst_list _list; CMPIInstance *pool = NULL; + + if (!match_hypervisor_prefix(ref, info)) + return s; inst_list_init(&_list); @@ -177,8 +180,11 @@ static CMPIStatus pool_to_rasd(const CMP struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; const char *poolid; + + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -305,8 +311,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:13 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:13 +0200 Subject: [Libvirt-cim] [PATCH 4 of 9] HS: Provider registered per subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196844142 -3600 # Node ID cf48a55a717b1aa79345e95aff6cfec96cbc2d65 # Parent bce59cb2dd5054ba4f01bc20d805ed99bd767119 HS: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r bce59cb2dd50 -r cf48a55a717b schema/HostedService.registration --- a/schema/HostedService.registration Wed Dec 05 09:42:21 2007 +0100 +++ b/schema/HostedService.registration Wed Dec 05 09:42:22 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 -# Classname Namespace ProviderName ProviderModule ProviderTypes ... -Xen_HostedService root/virt Xen_HostedServiceProvider Virt_HostedService association -KVM_HostedService root/virt KVM_HostedServiceProvider Virt_HostedService association +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association +KVM_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association diff -r bce59cb2dd50 -r cf48a55a717b src/Virt_HostedService.c --- a/src/Virt_HostedService.c Wed Dec 05 09:42:21 2007 +0100 +++ b/src/Virt_HostedService.c Wed Dec 05 09:42:22 2007 +0100 @@ -40,10 +40,11 @@ static CMPIStatus service_to_host(const struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; s = get_host_cs(_BROKER, ref, &instance); if (s.rc == CMPI_RC_OK) @@ -59,7 +60,8 @@ static CMPIStatus host_to_service(const CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; s = rpcs_instance(ref, &inst, _BROKER); if (s.rc != CMPI_RC_OK) @@ -159,8 +161,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:12 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:12 +0200 Subject: [Libvirt-cim] [PATCH 3 of 9] ESD: Provider registered per subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196844141 -3600 # Node ID bce59cb2dd5054ba4f01bc20d805ed99bd767119 # Parent b07a0b1db5d9bb50e80d08a06d8138de3a132c69 ESD: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r b07a0b1db5d9 -r bce59cb2dd50 schema/ElementSettingData.registration --- a/schema/ElementSettingData.registration Wed Dec 05 09:42:20 2007 +0100 +++ b/schema/ElementSettingData.registration Wed Dec 05 09:42:21 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 -# Classname Namespace ProviderName ProviderModule ProviderTypes ... -Xen_ElementSettingData root/virt Xen_ElementSettingDataProvider Virt_ElementSettingData association -KVM_ElementSettingData root/virt KVM_ElementSettingDataProvider Virt_ElementSettingData association +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association +KVM_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association diff -r b07a0b1db5d9 -r bce59cb2dd50 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Wed Dec 05 09:42:20 2007 +0100 +++ b/src/Virt_ElementSettingData.c Wed Dec 05 09:42:21 2007 +0100 @@ -39,13 +39,14 @@ static CMPIStatus vssd_to_vssd(const CMP struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst; virConnectPtr conn = NULL; virDomainPtr dom = NULL; char *host = NULL; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; if (!parse_instanceid(ref, NULL, &host)) { cu_statusf(_BROKER, &s, @@ -93,7 +94,8 @@ static CMPIStatus rasd_to_rasd(const CMP const char *id = NULL; uint16_t type; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -227,8 +229,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:15 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:15 +0200 Subject: [Libvirt-cim] [PATCH 6 of 9] SDC: Provider registered per subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196844143 -3600 # Node ID f67ca8f5c7d74e5b288a7cbf6d9e8a9e3f27f05e # Parent 9751a165ebca953b720faf81c4fdfd5d0748aa6a SDC: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r 9751a165ebca -r f67ca8f5c7d7 schema/SettingsDefineCapabilities.registration --- a/schema/SettingsDefineCapabilities.registration Wed Dec 05 09:42:22 2007 +0100 +++ b/schema/SettingsDefineCapabilities.registration Wed Dec 05 09:42:23 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineCapabilities root/virt Xen_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association -KVM_SettingsDefineCapabilities root/virt KVM_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association +Xen_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association +KVM_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association diff -r 9751a165ebca -r f67ca8f5c7d7 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Dec 05 09:42:22 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Wed Dec 05 09:42:23 2007 +0100 @@ -781,6 +781,9 @@ static CMPIStatus alloc_cap_to_rasd(cons int ret; uint16_t type; + if (!match_hypervisor_prefix(ref, info)) + return s; + CU_DEBUG("Getting ResourceType"); ret = cu_get_u16_path(ref, "ResourceType", &type); @@ -900,8 +903,7 @@ struct std_assoc *assoc_handlers[] = { }; -STDA_AssocMIStub(, Xen_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); -STDA_AssocMIStub(, KVM_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, Virt_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:16 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:16 +0200 Subject: [Libvirt-cim] [PATCH 7 of 9] SDS: Provider registered per subclass In-Reply-To: Message-ID: <904b939c9b2ae55caf2d.1196847016@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196844144 -3600 # Node ID 904b939c9b2ae55caf2d7e713747fce00b7bcecc # Parent f67ca8f5c7d74e5b288a7cbf6d9e8a9e3f27f05e SDS: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r f67ca8f5c7d7 -r 904b939c9b2a schema/SettingsDefineState.registration --- a/schema/SettingsDefineState.registration Wed Dec 05 09:42:23 2007 +0100 +++ b/schema/SettingsDefineState.registration Wed Dec 05 09:42:24 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineState root/virt Xen_SettingsDefineStateProvider Virt_SettingsDefineState association -KVM_SettingsDefineState root/virt KVM_SettingsDefineStateProvider Virt_SettingsDefineState association +Xen_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association +KVM_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association diff -r f67ca8f5c7d7 -r 904b939c9b2a src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Wed Dec 05 09:42:23 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Wed Dec 05 09:42:24 2007 +0100 @@ -66,13 +66,16 @@ static CMPIStatus dev_to_rasd(const CMPI struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *rasd; struct inst_list rasds; const char *id = NULL; char *name = NULL; char *devid = NULL; int ret; + + if (!match_hypervisor_prefix(ref, info)) + return s; inst_list_init(&rasds); @@ -153,12 +156,13 @@ static CMPIStatus rasd_to_dev(const CMPI struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *dev = NULL; const char *id = NULL; uint16_t type; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -194,7 +198,10 @@ static CMPIStatus vs_to_vssd(const CMPIO virDomainPtr dom = NULL; const char *name; CMPIInstance *vssd; - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (!match_hypervisor_prefix(ref, info)) + return s; conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); if (conn == NULL) @@ -238,8 +245,11 @@ static CMPIStatus vssd_to_vs(const CMPIO char *name = NULL; int ret; virConnectPtr conn = NULL; - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *cs; + + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -399,8 +409,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:17 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:17 +0200 Subject: [Libvirt-cim] [PATCH 8 of 9] SD: Provider registered per subclass In-Reply-To: Message-ID: <5b933cf3854176ae75fd.1196847017@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196844145 -3600 # Node ID 5b933cf3854176ae75fd07fe0c518a0aedb19a2b # Parent 904b939c9b2ae55caf2d7e713747fce00b7bcecc SD: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r 904b939c9b2a -r 5b933cf38541 schema/SystemDevice.registration --- a/schema/SystemDevice.registration Wed Dec 05 09:42:24 2007 +0100 +++ b/schema/SystemDevice.registration Wed Dec 05 09:42:25 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SystemDevice root/virt Xen_SystemDeviceProvider Virt_SystemDevice association -KVM_SystemDevice root/virt KVM_SystemDeviceProvider Virt_SystemDevice association +Xen_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association +KVM_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association diff -r 904b939c9b2a -r 5b933cf38541 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Wed Dec 05 09:42:24 2007 +0100 +++ b/src/Virt_SystemDevice.c Wed Dec 05 09:42:25 2007 +0100 @@ -162,7 +162,8 @@ static CMPIStatus sys_to_dev(const CMPIO CMPIStatus s = {CMPI_RC_OK, NULL}; int ret; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "Name", &host) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -196,9 +197,10 @@ static CMPIStatus dev_to_sys(const CMPIO char *host = NULL; char *dev = NULL; CMPIInstance *sys; - CMPIStatus s; - - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "DeviceID", &devid) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -288,8 +290,7 @@ static struct std_assoc *assoc_handlers[ NULL }; -STDA_AssocMIStub(, Xen_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); -STDA_AssocMIStub(, KVM_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, Virt_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:18 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:18 +0200 Subject: [Libvirt-cim] [PATCH 9 of 9] VSSDC: Provider registered per subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196844146 -3600 # Node ID b21fd24be46e086824d309f652b68ebe17eea34b # Parent 5b933cf3854176ae75fd07fe0c518a0aedb19a2b VSSDC: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r 5b933cf38541 -r b21fd24be46e schema/VSSDComponent.registration --- a/schema/VSSDComponent.registration Wed Dec 05 09:42:25 2007 +0100 +++ b/schema/VSSDComponent.registration Wed Dec 05 09:42:26 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemSettingDataComponent root/virt Xen_VSSDComponentProvider Virt_VSSDComponent association -KVM_VirtualSystemSettingDataComponent root/virt KVM_VSSDComponentProvider Virt_VSSDComponent association +Xen_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association +KVM_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association diff -r 5b933cf38541 -r b21fd24be46e src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Wed Dec 05 09:42:25 2007 +0100 +++ b/src/Virt_VSSDComponent.c Wed Dec 05 09:42:26 2007 +0100 @@ -40,7 +40,7 @@ static CMPIStatus vssd_to_rasd(const CMP struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; char *name = NULL; int i = 0; int types[] = { @@ -51,7 +51,8 @@ static CMPIStatus vssd_to_rasd(const CMP -1 }; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; if (!parse_instanceid(ref, NULL, &name)) { cu_statusf(_BROKER, &s, @@ -115,14 +116,15 @@ static CMPIStatus rasd_to_vssd(const CMP struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *vssd = NULL; const char *id = NULL; char *host = NULL; char *devid = NULL; int ret; - ASSOC_MATCH(info->provider_name, CLASSNAME(ref)); + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -230,8 +232,7 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); -STDA_AssocMIStub(, KVM_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, Virt_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 5 08:30:11 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:30:11 +0200 Subject: [Libvirt-cim] [PATCH 2 of 9] EC: Provider registered per subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196844140 -3600 # Node ID b07a0b1db5d9bb50e80d08a06d8138de3a132c69 # Parent 6500573879debb5d6086df84e17d4336090d8e92 EC: Provider registered per subclass The provider registration approach - registering one provider per subclass (Xen_Provider, KVM_Provider) caused interoperability issues with Pegasus and sfcb. The same call returned duplicates with sfcb and worked with Pegasus. Signed-off-by: Heidi Eckhart diff -r 6500573879de -r b07a0b1db5d9 schema/ElementCapabilities.registration --- a/schema/ElementCapabilities.registration Wed Dec 05 09:42:19 2007 +0100 +++ b/schema/ElementCapabilities.registration Wed Dec 05 09:42:20 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementCapabilities root/virt Xen_ElementCapabilitiesProvider Virt_ElementCapabilities association -KVM_ElementCapabilities root/virt KVM_ElementCapabilitiesProvider Virt_ElementCapabilities association +Xen_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association +KVM_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association diff -r 6500573879de -r b07a0b1db5d9 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Wed Dec 05 09:42:19 2007 +0100 +++ b/src/Virt_ElementCapabilities.c Wed Dec 05 09:42:20 2007 +0100 @@ -54,6 +54,9 @@ static CMPIStatus sys_to_cap(const CMPIO CMPIStatus s = {CMPI_RC_OK, NULL}; const char *prop; + if (!match_hypervisor_prefix(ref, info)) + return s; + s = get_host_cs(_BROKER, ref, &inst); if (s.rc != CMPI_RC_OK) goto out; @@ -80,6 +83,9 @@ static CMPIStatus cap_to_sys(const CMPIO CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; + if (!match_hypervisor_prefix(ref, info)) + return s; + s = get_host_cs(_BROKER, ref, &inst); if (s.rc != CMPI_RC_OK) goto out; @@ -98,6 +104,9 @@ static CMPIStatus cs_to_cap(const CMPIOb CMPIStatus s = {CMPI_RC_OK, NULL}; const char *sys_name = NULL; + if (!match_hypervisor_prefix(ref, info)) + return s; + if (cu_get_str_path(ref, "Name", &sys_name) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -121,6 +130,9 @@ static CMPIStatus cap_to_cs(const CMPIOb CMPIInstance *inst; virConnectPtr conn; CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -160,6 +172,9 @@ static CMPIStatus pool_to_alloc(const CM uint16_t type; CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK}; + + if (!match_hypervisor_prefix(ref, info)) + return s; if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -359,8 +374,7 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Xen_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); -STDA_AssocMIStub(, KVM_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, Virt_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* * Local Variables: * mode: C From heidieck at linux.vnet.ibm.com Wed Dec 5 08:40:02 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:40:02 +0200 Subject: [Libvirt-cim] [PATCH 0 of 2] Added match_hypervisor_prefix() to association's handler functions to avoid wrong results Message-ID: A request wbemain -ac Xen_ http://localhost/root/virt:KVM_ should not return any results, but did so for HD and HRP. From heidieck at linux.vnet.ibm.com Wed Dec 5 08:40:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:40:03 +0200 Subject: [Libvirt-cim] [PATCH 1 of 2] HD: Added match_hypervisor_prefix to avoid wrong results In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196845867 -3600 # Node ID ce0b042ac7dea58ab7767e5bc74db81c37f99352 # Parent b21fd24be46e086824d309f652b68ebe17eea34b HD: Added match_hypervisor_prefix to avoid wrong results The request wbemain -ac Xen_HostedDependency 'http://localhost/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="qemu1"' returned localhost:5988/root/virt:KVM_HostSystem.CreationClassName="KVM_HostSystem",Name="localhost.localdomain" which is wrong, as KVM_ComputerSystem is referenced to KVM_HostSystem via KVM_HostedDependency instead of Xen_HostedDependency. Signed-off-by: Heidi Eckhart diff -r b21fd24be46e -r ce0b042ac7de src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_HostedDependency.c Wed Dec 05 10:11:07 2007 +0100 @@ -40,8 +40,11 @@ static CMPIStatus vs_to_host(const CMPIO struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance; + + if (!match_hypervisor_prefix(ref, info)) + return s; s = get_host_cs(_BROKER, ref, &instance); if (s.rc == CMPI_RC_OK) @@ -56,7 +59,10 @@ static CMPIStatus host_to_vs(const CMPIO { int ret; virConnectPtr conn; - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (!match_hypervisor_prefix(ref, info)) + return s; conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); if (conn == NULL) From heidieck at linux.vnet.ibm.com Wed Dec 5 08:40:04 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:40:04 +0200 Subject: [Libvirt-cim] [PATCH 2 of 2] HRP: Added match_hypervisor_prefix to avoid wrong results In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196846065 -3600 # Node ID c3e4344951cef32a2c89e90f5345b20171c5e58d # Parent ce0b042ac7dea58ab7767e5bc74db81c37f99352 HRP: Added match_hypervisor_prefix to avoid wrong results The request wbemain -ac Xen_HostedResourcePool 'http://localhost/root/virt:KVM_HostSystem.CreationClassName="KVM_HostSystem",Name="localhost.localdomain"' returned localhost:5988/root/virt:KVM_ProcessorPool.InstanceID="ProcessorPool/0" localhost:5988/root/virt:KVM_MemoryPool.InstanceID="MemoryPool/0" localhost:5988/root/virt:KVM_DiskPool.InstanceID="DiskPool/foo" which is wrong, as KVM_HostSystem is referenced to KVM_MemoryPool (...) via KVM_HostedResourcePool instead of Xen_HostedResourcePool. Signed-off-by: Heidi Eckhart diff -r ce0b042ac7de -r c3e4344951ce src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Wed Dec 05 10:11:07 2007 +0100 +++ b/src/Virt_HostedResourcePool.c Wed Dec 05 10:14:25 2007 +0100 @@ -42,7 +42,10 @@ static CMPIStatus pool_to_sys(const CMPI struct inst_list *list) { CMPIInstance *host; - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (!match_hypervisor_prefix(ref, info)) + return s; s = get_host_cs(_BROKER, ref, &host); if (s.rc != CMPI_RC_OK) @@ -57,11 +60,14 @@ static CMPIStatus sys_to_pool(const CMPI struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s; + CMPIStatus s = {CMPI_RC_OK, NULL}; int i; virConnectPtr conn; CMPIInstance *host; const char *prop; + + if (!match_hypervisor_prefix(ref, info)) + return s; s = get_host_cs(_BROKER, ref, &host); if (s.rc != CMPI_RC_OK) From heidieck at linux.vnet.ibm.com Wed Dec 5 09:46:47 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 10:46:47 +0100 Subject: [Libvirt-cim] [PATCH] Fix typos for disk & network classes in SDC SD & EAFP In-Reply-To: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> References: <7dbad83883a3f5eaeeda.1196763930@zeit.cn.ibm.com> Message-ID: <47567387.8000307@linux.vnet.ibm.com> lizg at cn.ibm.com wrote: > # HG changeset patch > # User Zhengang Li > # Date 1196763876 -28800 > # Node ID 7dbad83883a3f5eaeedac4e415a97fb459ec50e5 > # Parent 7fd4f296b8cc328a7492a24c731d8722bc485452 > Fix typos for disk & network classes in SDC SD & EAFP > > *_LogicalDisk & *_NetworkPort classes are typo-ed as *_Disk & *_Network > in several assoc classes' handler param. This leads to some assoc failure. > > Signed-off-by: Zhengang Li > Great catch :) ... sorry, this was my inattention. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 5 11:38:57 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 12:38:57 +0100 Subject: [Libvirt-cim] [PATCH] VSMC returns extra instances - add connect_by_classname In-Reply-To: <4755DD33.8010502@linux.vnet.ibm.com> References: <4755DD33.8010502@linux.vnet.ibm.com> Message-ID: <47568DD1.5010706@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Kaitlin Rupert wrote: >> # HG changeset patch >> # User Kaitlin Rupert >> # Date 1196809769 28800 >> # Node ID f83fe9e0ad3648502dcc52eabdb8ebc2c6baf046 >> # Parent e9e11611dc975a72237a9653b0a4a07ab9b4b4e1 >> VSMC returns extra instances - add connect_by_classname. >> >> VSMC is returning an instance for both KVM and Xen, when only a Xen >> instance should be returned. >> >> Test query: >> wbemcli ein >> http://localhost/root/virt:CIM_VirtualSystemManagementCapabilities >> >> Signed-off-by: Kaitlin Rupert >> > Heidi, I'm not sure this will solve the problem where wbemein > http://localhost/root/virt:CIM_EnabledLogicalElementCapabilities > returns incorrect / invalid instances. I think I hit a race condition > today that caused connect_by_classname(KVM_<>) to pass even though > libvirtd wasn't even running on my test system. That sounds strange. Are you sure, that no libvirt was somehow reachable ? Is in theory an instance of KVM_ valid on your test system, or not ? I was able to successfully test the patch set against Pegasus and sfcb ... +1 for the complete patch set -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 5 10:57:59 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 12:57:59 +0200 Subject: [Libvirt-cim] [PATCH] [RFC] variable renaming in make_ref() of associations Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196855770 -3600 # Node ID b49cfc1c6e9c3e4669bceea2f518f6c4f8bf3f82 # Parent 012fc8655c2b443511ba536ef2b425ac86f69f7b [RFC] variable renaming in make_ref() of associations Suggestion to rename some of the variables in make_ref() to make the relations clearer. Signed-off-by: Heidi Eckhart diff -r 012fc8655c2b -r b49cfc1c6e9c src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Wed Dec 05 12:49:18 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Wed Dec 05 12:56:10 2007 +0100 @@ -247,27 +247,27 @@ static CMPIStatus pool_to_vdev(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, +static CMPIInstance *make_ref(const CMPIObjectPath *source_ref, + const CMPIInstance *target_inst, struct std_assoc_info *info, struct std_assoc *assoc) { - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "ElementAllocatedFromPool", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; + CMPIInstance *ref_inst = NULL; + + ref_inst = get_typed_instance(_BROKER, + CLASSNAME(source_ref), + "ElementAllocatedFromPool", + NAMESPACE(source_ref)); + + if (ref_inst != NULL) { + CMPIObjectPath *target_ref; + + target_ref = CMGetObjectPath(target_inst, NULL); + + set_reference(assoc, ref_inst, source_ref, target_ref); + } + + return ref_inst; } char* antecedent[] = { From heidieck at linux.vnet.ibm.com Wed Dec 5 12:26:19 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 13:26:19 +0100 Subject: [Libvirt-cim] [PATCH] [RFC] variable renaming in make_ref() of associations In-Reply-To: References: Message-ID: <475698EB.8000807@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1196855770 -3600 > # Node ID b49cfc1c6e9c3e4669bceea2f518f6c4f8bf3f82 > # Parent 012fc8655c2b443511ba536ef2b425ac86f69f7b > [RFC] variable renaming in make_ref() of associations > > Please ignore this one. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 5 12:27:11 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 13:27:11 +0100 Subject: [Libvirt-cim] [PATCH] [RFC] make_ref() of associations In-Reply-To: <873auj4eas.fsf@theine.beaverton.ibm.com> References: <47547986.2000701@linux.vnet.ibm.com> <873auj4eas.fsf@theine.beaverton.ibm.com> Message-ID: <4756991F.9090108@linux.vnet.ibm.com> Dan Smith wrote: > JG> I realize it's a more logical abbreviation than "ref", but we use > JG> "ref" in so many places that I think it's pretty firmly > JG> established > > For the parameter, I think source_ref would be fine. I don't think > changing it to not include "ref" makes it more clear, since the > convention (as it seems to me) is that the object path you pass in as > the "subject" of an operation is called the "reference". > > For the "refinst" local variable, I think leaving "ref" in the name > also makes sense. The goal of the function is to "make a reference", > so "refinst" seems to be a reasonable name :) > > JG> I personally always see "op" and think "operand" or "operation." I > JG> would recommend a compromise of "source_ref" for that one. > > Me too! I'd be okay with "source_ref", but I question how much more > clarity it will bring given how much patch churn it will produce. > However, if others want this change, I'm okay with it. Thanks for the comments. I was resending the patch as "variable renaming in make_ref() of associations". Yes, its very good to question this patch. And the more I think about, the more I find, that there is the possibility to generalize the content of make_ref() - because at the end most of the association's make_ref() will look the same, besides the different association class names. I will send out the patch for this idea. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 5 12:37:50 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 13:37:50 +0100 Subject: [Libvirt-cim] [PATCH] [RFC] make_ref() of associations In-Reply-To: <47547986.2000701@linux.vnet.ibm.com> References: <47547986.2000701@linux.vnet.ibm.com> Message-ID: <47569B9E.5080608@linux.vnet.ibm.com> Jay Gagnon wrote: > Heidi Eckhart wrote: > >> # HG changeset patch >> # User Heidi Eckhart >> # Date 1196686834 -3600 >> # Node ID bea3e027d42ff41fc452935427981739bab76573 >> # Parent a1582d092f517919470b9ce7ff034b89e4b2bade >> [RFC] make_ref() of associations >> >> While thinking about the implementation of make_ref() and about >> my proposal to base the asscociation's instance creation on a >> connect_by_classname, I came to the conclusion that opening a >> connection to libvirt for not using it, is overkill for this >> method. Once make_ref() gets called by the std_association logic, >> the provider can rely on that the prefix of the given reference >> was checked for the right hypervisor prefix. So I suggest to >> update all make_ref() functions to use get_typed_instance(). >> ... and refix some of my fixes :0. >> Besides that I suggest to rename some of the variables in >> make_ref() to make the relations clearer. >> Signed-off-by: Heidi Eckhart >> <...> > Second thing, I think I'm missing something in the first paragraph > of your commit message. I'm not entirely sure I understand the > explanation that leads up to "So I suggest to update all make_ref() > functions to use get_typed_instance()," and it also doesn't seem to > really relate to this patch, which only appears to do some renaming in > make_ref. It seems like a good point of discussion, and clarification > would be good, but maybe we should move it to a separate thread and > limit this patch discussion to the variable naming. > > Sorry for causing this confusion. The renaming was one thing, but as the patch showed how the code for each make_ref() would look like, I wanted to also bring up this idea. But not very well described. I will send out a patch "#2 - variable renaming in make_ref() of associations", which shows what I meant. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 5 11:41:46 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 13:41:46 +0200 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196858495 -3600 # Node ID af64285fa953aca6c4183d0fd6845d110ddd1a1d # Parent 012fc8655c2b443511ba536ef2b425ac86f69f7b [RFC] #2 - variable renaming in make_ref() of associations Suggestion to rename some of the variables in make_ref() to make the relations clearer. Also moved the content of make_ref() to make_reference() in libxkutil to generalize it. This make_reference can then be used by each association's make_ref(). Signed-off-by: Heidi Eckhart diff -r 012fc8655c2b -r af64285fa953 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Wed Dec 05 12:49:18 2007 +0100 +++ b/libxkutil/misc_util.c Wed Dec 05 13:41:35 2007 +0100 @@ -342,7 +342,30 @@ bool match_hypervisor_prefix(const CMPIO return rc; } - +CMPIInstance *make_reference(const CMPIBroker *broker, + const CMPIObjectPath *source_ref, + const CMPIInstance *target_inst, + struct std_assoc *assoc, + const char *assoc_classname) +{ + + CMPIInstance *ref_inst = NULL; + + ref_inst = get_typed_instance(broker, + CLASSNAME(source_ref), + assoc_classname, + NAMESPACE(source_ref)); + + if (ref_inst != NULL) { + CMPIObjectPath *target_ref; + + target_ref = CMGetObjectPath(target_inst, NULL); + + set_reference(assoc, ref_inst, source_ref, target_ref); + } + + return ref_inst; +} bool domain_online(virDomainPtr dom) { diff -r 012fc8655c2b -r af64285fa953 libxkutil/misc_util.h --- a/libxkutil/misc_util.h Wed Dec 05 12:49:18 2007 +0100 +++ b/libxkutil/misc_util.h Wed Dec 05 13:41:35 2007 +0100 @@ -109,6 +109,12 @@ bool match_hypervisor_prefix(const CMPIO bool match_hypervisor_prefix(const CMPIObjectPath *reference, struct std_assoc_info *info); +CMPIInstance *make_reference(const CMPIBroker *broker, + const CMPIObjectPath *source_ref, + const CMPIInstance *target_inst, + struct std_assoc *assoc, + const char *assoc_classname); + /* * Local Variables: * mode: C diff -r 012fc8655c2b -r af64285fa953 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Wed Dec 05 12:49:18 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Wed Dec 05 13:41:35 2007 +0100 @@ -247,27 +247,20 @@ static CMPIStatus pool_to_vdev(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, +static CMPIInstance *make_ref(const CMPIObjectPath *source_ref, + const CMPIInstance *target_inst, struct std_assoc_info *info, struct std_assoc *assoc) { - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "ElementAllocatedFromPool", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; + CMPIInstance *ref_inst = NULL; + + ref_inst = make_reference(_BROKER, + source_ref, + target_inst, + assoc, + "ElementAllocatedFromPool"); + + return ref_inst; } char* antecedent[] = { From heidieck at linux.vnet.ibm.com Wed Dec 5 12:45:29 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 13:45:29 +0100 Subject: [Libvirt-cim] [PATCH 0 of 6] Add migration support In-Reply-To: References: Message-ID: <47569D69.1050703@linux.vnet.ibm.com> Dan Smith wrote: > This patch set adds preliminary migration support based on the current > Virtual System Migration Profile. It's not quite done yet, but it does > actually migrate VMs (tested with Xen). > > Still needing to be done are: > - MigrationSettingData (perhaps to include ssh/TLS flag?) > - Something for IsMigratable methods > - Job support > - Indication support > Great work :). Can we add a check to the configure script for the right libvirt version ? My one seems to be outdated and the compile exits with error. cc1: warnings being treated as errors Virt_VSMigrationService.c: In function 'migrate_vs': Virt_VSMigrationService.c:278: warning: implicit declaration of function 'virDomainMigrate' Virt_VSMigrationService.c:278: error: 'VIR_MIGRATE_LIVE' undeclared (first use in this function) Virt_VSMigrationService.c:278: error: (Each undeclared identifier is reported only once Virt_VSMigrationService.c:278: error: for each function it appears in.) Virt_VSMigrationService.c:278: warning: assignment makes pointer from integer without a cast -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From danms at us.ibm.com Wed Dec 5 14:10:14 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Dec 2007 06:10:14 -0800 Subject: [Libvirt-cim] [PATCH 0 of 6] Add migration support In-Reply-To: <47569D69.1050703@linux.vnet.ibm.com> (Heidi Eckhart's message of "Wed, 05 Dec 2007 13:45:29 +0100") References: <47569D69.1050703@linux.vnet.ibm.com> Message-ID: <87ve7dxmex.fsf@theine.beaverton.ibm.com> HE> Can we add a check to the configure script for the right libvirt HE> version ? My one seems to be outdated and the compile exits with HE> error. Yeah, absolutely. I actually hit another such error when I first test-compiled on an older box because I forgot to point it at /usr/local. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Wed Dec 5 14:46:35 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Wed, 05 Dec 2007 09:46:35 -0500 Subject: [Libvirt-cim] [PATCH 0 of 2] Added match_hypervisor_prefix() to association's handler functions to avoid wrong results In-Reply-To: References: Message-ID: <4756B9CB.4050307@linux.vnet.ibm.com> Heidi Eckhart wrote: > A request > wbemain -ac Xen_ http://localhost/root/virt:KVM_ should not return any results, but did so for HD and HRP. > > Nice job finding this. Looks like match_hypervisor_prefix is working out nicely. +1 P.S. We've tested match_hypervisor_prefix with both sfcb and pegasus, right? I'd love to know we finally have this duplicates issue resolved for both CIMOMs. -- -Jay From grendel at linux.vnet.ibm.com Wed Dec 5 14:54:01 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Wed, 05 Dec 2007 09:54:01 -0500 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations In-Reply-To: References: Message-ID: <4756BB89.6030805@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1196858495 -3600 > # Node ID af64285fa953aca6c4183d0fd6845d110ddd1a1d > # Parent 012fc8655c2b443511ba536ef2b425ac86f69f7b > [RFC] #2 - variable renaming in make_ref() of associations > > Suggestion to rename some of the variables in make_ref() > to make the relations clearer. > Also moved the content of make_ref() to make_reference() > in libxkutil to generalize it. This make_reference can > then be used by each association's make_ref(). > Signed-off-by: Heidi Eckhart > I like this. The rename is definitely more worthwhile if we generalize it, and I agree that it really can be generalized, as this patch shows. My only question is: would this be better suited to being part of std_association instead of libxkutil? Seems like anything that will use std_association will probably want to use make_reference(). -- -Jay From danms at us.ibm.com Wed Dec 5 17:26:11 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Dec 2007 09:26:11 -0800 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations In-Reply-To: (Heidi Eckhart's message of "Wed, 05 Dec 2007 13:41:46 +0200") References: Message-ID: <87r6i1xdcc.fsf@theine.beaverton.ibm.com> HE> # HG changeset patch HE> # User Heidi Eckhart HE> # Date 1196858495 -3600 HE> # Node ID af64285fa953aca6c4183d0fd6845d110ddd1a1d HE> # Parent 012fc8655c2b443511ba536ef2b425ac86f69f7b HE> [RFC] #2 - variable renaming in make_ref() of associations HE> Suggestion to rename some of the variables in make_ref() HE> to make the relations clearer. HE> Also moved the content of make_ref() to make_reference() HE> in libxkutil to generalize it. This make_reference can HE> then be used by each association's make_ref(). Sounds good to me. HE> + CMPIInstance *ref_inst = NULL; HE> + HE> + ref_inst = make_reference(_BROKER, HE> + source_ref, HE> + target_inst, HE> + assoc, HE> + "ElementAllocatedFromPool"); HE> + HE> + return ref_inst; HE> } Why not just pass the make_reference function from libxkutil directly in the std_assoc block? The function should be able to infer the name of the reference from the assoc_class field of the std_assoc or info struct, right? That would let us cut out even more code from all the providers :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Wed Dec 5 17:27:13 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Dec 2007 09:27:13 -0800 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations In-Reply-To: <4756BB89.6030805@linux.vnet.ibm.com> (Jay Gagnon's message of "Wed, 05 Dec 2007 09:54:01 -0500") References: <4756BB89.6030805@linux.vnet.ibm.com> Message-ID: <87myspxdam.fsf@theine.beaverton.ibm.com> JG> My only question is: would this be better suited to being part of JG> std_association instead of libxkutil? Seems like anything that JG> will use std_association will probably want to use JG> make_reference(). No, the make_ref behavior is something we need to do in a special way that others won't. Putting the (Xen_|KVM_) switch into std_association would pollute libcmpiutil with libvirt-cim behavior. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Wed Dec 5 19:01:22 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Dec 2007 11:01:22 -0800 Subject: [Libvirt-cim] [PATCH 0 of 9] #2 - Reorganized association provider registration In-Reply-To: (Heidi Eckhart's message of "Wed, 05 Dec 2007 10:30:09 +0200") References: Message-ID: <87ir3dx8xp.fsf@theine.beaverton.ibm.com> HE> The provider registration approach - registering one provider per HE> subclass (Xen_Provider, KVM_Provider) caused HE> interoperability issues with Pegasus and sfcb. The same call HE> returned duplicates with sfcb and worked with Pegasus. I applied all of these and tested almost all of them. Thanks Heidi! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From heidieck at linux.vnet.ibm.com Wed Dec 5 19:06:53 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 20:06:53 +0100 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations In-Reply-To: <87myspxdam.fsf@theine.beaverton.ibm.com> References: <4756BB89.6030805@linux.vnet.ibm.com> <87myspxdam.fsf@theine.beaverton.ibm.com> Message-ID: <4756F6CD.9060505@linux.vnet.ibm.com> Dan Smith wrote: > JG> My only question is: would this be better suited to being part of > JG> std_association instead of libxkutil? Seems like anything that > JG> will use std_association will probably want to use > JG> make_reference(). > Yes, that was my first try, until I had to realize that get_typed_instance() is that special to our providers as Dan describes below ;). So I had to move it to libxkutil. > No, the make_ref behavior is something we need to do in a special way > that others won't. Putting the (Xen_|KVM_) switch into > std_association would pollute libcmpiutil with libvirt-cim behavior. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 5 20:21:20 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 05 Dec 2007 21:21:20 +0100 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations In-Reply-To: <87r6i1xdcc.fsf@theine.beaverton.ibm.com> References: <87r6i1xdcc.fsf@theine.beaverton.ibm.com> Message-ID: <47570840.7040504@linux.vnet.ibm.com> Dan Smith wrote: > HE> + CMPIInstance *ref_inst = NULL; > HE> + > HE> + ref_inst = make_reference(_BROKER, > HE> + source_ref, > HE> + target_inst, > HE> + assoc, > HE> + "ElementAllocatedFromPool"); > HE> + > HE> + return ref_inst; > HE> } > > Why not just pass the make_reference function from libxkutil directly > in the std_assoc block? The function should be able to infer the name > of the reference from the assoc_class field of the std_assoc or info > struct, right? > > That would let us cut out even more code from all the providers :) That's a ery interesting idea ! Sadly the current input parameter list of make_ref_t() in struct std_assoc does not include a broker pointer, which prevents me from reworking it in your suggested way. Maybe you have an idea how to solve this ? Thanks :). -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From danms at us.ibm.com Wed Dec 5 22:15:00 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Dec 2007 14:15:00 -0800 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations References: <87r6i1xdcc.fsf@theine.beaverton.ibm.com> <47570840.7040504@linux.vnet.ibm.com> Message-ID: <87zlwowzyz.fsf@theine.beaverton.ibm.com> HE> Sadly the current input parameter list of make_ref_t() in struct HE> std_assoc does not include a broker pointer, which prevents me HE> from reworking it in your suggested way. Ah, right :( HE> Maybe you have an idea how to solve this ? Perhaps we could have a macro that dispatches the make_reference() function with the appropriate broker? Maybe something like the following: #define LIBVIRT_CIM_DEFAULT_MAKEREF \ static CMPIInstance make_ref(const CMPIObjectPath *ref, \ const CMPIInstance *inst, \ struct std_assoc_info *info, \ struct std_assoc *assoc) \ { \ return default_make_ref(_BROKER, ref, inst, info, assoc);\ } What do you think? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From jfehlig at novell.com Thu Dec 6 01:10:57 2007 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 05 Dec 2007 18:10:57 -0700 Subject: [Libvirt-cim] [PATCH 3 of 6] Add build support forVirtualSystemMigrationService In-Reply-To: <58bd9f06204f69bbdbe3.1196787365@theine> References: <58bd9f06204f69bbdbe3.1196787365@theine> Message-ID: <47574C21.7030907@novell.com> Hi Dan, [...] > + > +// Placeholder definition until schema is available upstream > + > +class CIM_VirtualSystemMigrationService : CIM_Service { > + uint32 VirtualSystemIsMigratableToHost( > That one is called 'CheckVirtualSystemIsMigratableToHost' upstream - although I like your shorted name better as 'Check' is already implied by the rest :-). Think I will comment as such to the author of that CR [1]. > + [Out] > + CIM_ConcreteJob REF Job, > + [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] > + string NewResourceSettingData[], > + [In, EmbeddedInstance("CIM_SettingData")] > + string MigrationSettingData, > + [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] > + string NewSystemSettingData, > + [In] > + CIM_ComputerSystem REF ComputerSystem, > + [In] > + string DestinationHost); > Method arguments have a different order in the CR. > + > + uint32 MigrateVirtualSystemToHost( > + [Out] > + CIM_ConcreteJob REF Job, > + [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] > + string NewResourceSettingData[], > + [In, EmbeddedInstance("CIM_SettingData")] > + string MigrationSettingData, > + [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] > + string NewSystemSettingData, > + [In] > + CIM_ComputerSystem REF ComputerSystem, > + [In] > + string DestinationHost); > + > +}; > Same comment. Cheers, Jim [1] http://www.dmtf.org/apps/org/workgroup/cim-core/download.php/32768/CIMCoreCR00968.003.html From danms at us.ibm.com Thu Dec 6 02:11:22 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Dec 2007 18:11:22 -0800 Subject: [Libvirt-cim] [PATCH 3 of 6] Add build support forVirtualSystemMigrationService In-Reply-To: <47574C21.7030907@novell.com> (Jim Fehlig's message of "Wed, 05 Dec 2007 18:10:57 -0700") References: <58bd9f06204f69bbdbe3.1196787365@theine> <47574C21.7030907@novell.com> Message-ID: <87ve7cwp11.fsf@theine.beaverton.ibm.com> JF> That one is called 'CheckVirtualSystemIsMigratableToHost' upstream Ah, thanks Jim. I actually expect we will pull in a recent DMTF MOF to cover our inheritance here, so I was just putting something in place temporarily. I'll correct it though so it doesn't get overlooked. JF> - although I like your shorted name better as 'Check' is already JF> implied by the rest :-). Think I will comment as such to the JF> author of that CR [1]. No complaints here :) JF> Method arguments have a different order in the CR. I'll fix this as well when I put together my next round of migration patches. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From heidieck at linux.vnet.ibm.com Thu Dec 6 09:06:54 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 06 Dec 2007 11:06:54 +0200 Subject: [Libvirt-cim] [PATCH] Introduce generic LIBVIRT_CIM_DEFAULT_MAKEREF macro Message-ID: <618509ea5c6089678975.1196935614@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196935598 -3600 # Node ID 618509ea5c6089678975cde7f4b5a687aa1e68f0 # Parent d9af4651f76314647dbda82f5ccf3d926ce9dc05 Introduce generic LIBVIRT_CIM_DEFAULT_MAKEREF macro Moved the content of association's make_ref() to make_reference() in libxkutil to generalize it. The make_reference can be used via LIBVIRT_CIM_DEFAULT_MAKEREF macro by each association. Reduces lines of code per provider. Updated all association providers to make use of make_reference() and LIBVIRT_CIM_DEFAULT_MAKEREF. Signed-off-by: Heidi Eckhart diff -r d9af4651f763 -r 618509ea5c60 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Wed Dec 05 09:42:26 2007 +0100 +++ b/libxkutil/misc_util.c Thu Dec 06 11:06:38 2007 +0100 @@ -342,7 +342,35 @@ bool match_hypervisor_prefix(const CMPIO return rc; } - +CMPIInstance *make_reference(const CMPIBroker *broker, + const CMPIObjectPath *source_ref, + const CMPIInstance *target_inst, + struct std_assoc_info *info, + struct std_assoc *assoc) +{ + CMPIInstance *ref_inst = NULL; + char* assoc_classname; + + assoc_classname = class_base_name(assoc->assoc_class[0]); + + ref_inst = get_typed_instance(broker, + CLASSNAME(source_ref), + assoc_classname, + NAMESPACE(source_ref)); + + if (ref_inst != NULL) { + CMPIObjectPath *target_ref; + + target_ref = CMGetObjectPath(target_inst, NULL); + + set_reference(assoc, ref_inst, + source_ref, target_ref); + } + + free(assoc_classname); + + return ref_inst; +} bool domain_online(virDomainPtr dom) { diff -r d9af4651f763 -r 618509ea5c60 libxkutil/misc_util.h --- a/libxkutil/misc_util.h Wed Dec 05 09:42:26 2007 +0100 +++ b/libxkutil/misc_util.h Thu Dec 06 11:06:38 2007 +0100 @@ -109,6 +109,26 @@ bool match_hypervisor_prefix(const CMPIO bool match_hypervisor_prefix(const CMPIObjectPath *reference, struct std_assoc_info *info); +CMPIInstance *make_reference(const CMPIBroker *broker, + const CMPIObjectPath *source_ref, + const CMPIInstance *target_inst, + struct std_assoc_info *info, + struct std_assoc *assoc); + + +#define LIBVIRT_CIM_DEFAULT_MAKEREF() \ + static CMPIInstance* make_ref(const CMPIObjectPath *source_ref, \ + const CMPIInstance *target_inst, \ + struct std_assoc_info *info, \ + struct std_assoc *assoc) \ + { \ + return make_reference(_BROKER, \ + source_ref, \ + target_inst, \ + info, \ + assoc); \ + } + /* * Local Variables: * mode: C diff -r d9af4651f763 -r 618509ea5c60 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Thu Dec 06 11:06:38 2007 +0100 @@ -247,28 +247,7 @@ static CMPIStatus pool_to_vdev(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "ElementAllocatedFromPool", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* antecedent[] = { "Xen_ProcessorPool", diff -r d9af4651f763 -r 618509ea5c60 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_ElementCapabilities.c Thu Dec 06 11:06:38 2007 +0100 @@ -210,39 +210,7 @@ static CMPIStatus pool_to_alloc(const CM return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *refinst = NULL; - virConnectPtr conn = NULL; - - conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); - if (conn == NULL) - return NULL; - - refinst = get_typed_instance(_BROKER, - pfx_from_conn(conn), - "ElementCapabilities", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - CMSetProperty(refinst, assoc->source_prop, - (CMPIValue *)&ref, CMPI_ref); - CMSetProperty(refinst, assoc->target_prop, - (CMPIValue *)&instop, CMPI_ref); - } - - virConnectClose(conn); - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* assoc_classname[] = { "Xen_ElementCapabilities", diff -r d9af4651f763 -r 618509ea5c60 src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_ElementConformsToProfile.c Thu Dec 06 11:06:38 2007 +0100 @@ -190,38 +190,7 @@ static CMPIStatus elem_to_prof(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *source_op, - const CMPIInstance *target_inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *assoc_inst = NULL; - virConnectPtr conn = NULL; - - conn = connect_by_classname(_BROKER, CLASSNAME(source_op), &s); - if (conn == NULL) - return NULL; - - assoc_inst = get_typed_instance(_BROKER, - pfx_from_conn(conn), - "ElementConformsToProfile", - NAMESPACE(source_op)); - - if (!CMIsNullObject(assoc_inst)) { - CMPIObjectPath *target_op; - target_op = CMGetObjectPath(target_inst, NULL); - - CMSetProperty(assoc_inst, assoc->source_prop, - (CMPIValue *)&(source_op), CMPI_ref); - CMSetProperty(assoc_inst, assoc->target_prop, - (CMPIValue *)&(target_op), CMPI_ref); - } - - virConnectClose(conn); - - return assoc_inst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* conformant_standard[] = { "Xen_RegisteredProfile", diff -r d9af4651f763 -r 618509ea5c60 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_ElementSettingData.c Thu Dec 06 11:06:38 2007 +0100 @@ -126,50 +126,37 @@ static CMPIStatus rasd_to_rasd(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, +static CMPIInstance *make_ref(const CMPIObjectPath *source_ref, + const CMPIInstance *target_inst, struct std_assoc_info *info, struct std_assoc *assoc) { - CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *refinst = NULL; - virConnectPtr conn = NULL; uint16_t prop_value = 1; - conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); - if (conn == NULL) - return NULL; - - refinst = get_typed_instance(_BROKER, - pfx_from_conn(conn), - "ElementSettingData", - NAMESPACE(ref)); + refinst = make_reference(_BROKER, + source_ref, + target_inst, + info, + assoc); if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - /* Set additional properties with values * defined in the "Virtual System Profile." */ CMSetProperty(refinst, "IsDefault", - (CMPIValue *)&prop_value, CMPI_uint16); - + (CMPIValue *)&prop_value, CMPI_uint16); + CMSetProperty(refinst, "IsNext", - (CMPIValue *)&prop_value, CMPI_uint16); + (CMPIValue *)&prop_value, CMPI_uint16); CMSetProperty(refinst, "IsMinimum", - (CMPIValue *)&prop_value, CMPI_uint16); - + (CMPIValue *)&prop_value, CMPI_uint16); + CMSetProperty(refinst, "IsMaximum", - (CMPIValue *)&prop_value, CMPI_uint16); - } - - virConnectClose(conn); - + (CMPIValue *)&prop_value, CMPI_uint16); + } + return refinst; } diff -r d9af4651f763 -r 618509ea5c60 src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_HostedDependency.c Thu Dec 06 11:06:38 2007 +0100 @@ -82,28 +82,7 @@ static CMPIStatus host_to_vs(const CMPIO return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "HostedDependency", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* antecedent[] = { "Xen_ComputerSystem", @@ -149,7 +128,6 @@ static struct std_assoc _host_to_vs = { .make_ref = make_ref }; - static struct std_assoc *handlers[] = { &_vs_to_host, &_host_to_vs, diff -r d9af4651f763 -r 618509ea5c60 src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_HostedResourcePool.c Thu Dec 06 11:06:38 2007 +0100 @@ -97,32 +97,7 @@ static CMPIStatus sys_to_pool(const CMPI return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIInstance *refinst; - char *base; - - base = class_base_name(info->assoc_class); - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - base, - NAMESPACE(ref)); - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - free(base); - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* group_component[] = { "Xen_HostSystem", @@ -180,7 +155,6 @@ struct std_assoc *assoc_handlers[] = { NULL }; - STDA_AssocMIStub(, Virt_HostedResourcePoolProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* diff -r d9af4651f763 -r 618509ea5c60 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_HostedService.c Thu Dec 06 11:06:38 2007 +0100 @@ -85,36 +85,7 @@ static CMPIStatus host_to_service(const return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *refinst = NULL; - virConnectPtr conn = NULL; - - conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); - if (conn == NULL) - return NULL; - - refinst = get_typed_instance(_BROKER, - pfx_from_conn(conn), - "HostedService", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - virConnectClose(conn); - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* antecedent[] = { "Xen_HostSystem", diff -r d9af4651f763 -r 618509ea5c60 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_ResourceAllocationFromPool.c Thu Dec 06 11:06:38 2007 +0100 @@ -226,28 +226,7 @@ static CMPIStatus pool_to_rasd(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "ResourceAllocationFromPool", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* antecedent[] = { "Xen_ProcessorPool", diff -r d9af4651f763 -r 618509ea5c60 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Dec 06 11:06:38 2007 +0100 @@ -812,39 +812,8 @@ static CMPIStatus rasd_to_alloc_cap(cons return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *refinst = NULL; - virConnectPtr conn = NULL; - - conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); - if (conn == NULL) - return NULL; - - refinst = get_typed_instance(_BROKER, - pfx_from_conn(conn), - "SettingsDefineCapabilities", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - CMSetProperty(refinst, assoc->source_prop, - (CMPIValue *)&ref, CMPI_ref); - CMSetProperty(refinst, assoc->target_prop, - (CMPIValue *)&instop, CMPI_ref); - } - - virConnectClose(conn); - - return refinst; -} + +LIBVIRT_CIM_DEFAULT_MAKEREF() char* group_component[] = { "Xen_AllocationCapabilities", @@ -902,7 +871,6 @@ struct std_assoc *assoc_handlers[] = { NULL }; - STDA_AssocMIStub(, Virt_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); /* diff -r d9af4651f763 -r 618509ea5c60 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Thu Dec 06 11:06:38 2007 +0100 @@ -288,28 +288,7 @@ static CMPIStatus vssd_to_vs(const CMPIO return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "SettingsDefineState", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* logical_device[] = { "Xen_Processor", diff -r d9af4651f763 -r 618509ea5c60 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_SystemDevice.c Thu Dec 06 11:06:38 2007 +0100 @@ -130,30 +130,6 @@ static CMPIInstance *host_instance(char return inst; } - -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "SystemDevice", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; -} - static CMPIStatus sys_to_dev(const CMPIObjectPath *ref, struct std_assoc_info *info, struct inst_list *list) @@ -233,6 +209,8 @@ static CMPIStatus dev_to_sys(const CMPIO return s; } + +LIBVIRT_CIM_DEFAULT_MAKEREF() char* group_component[] = { "Xen_ComputerSystem", diff -r d9af4651f763 -r 618509ea5c60 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Virt_VSSDComponent.c Thu Dec 06 11:06:38 2007 +0100 @@ -152,28 +152,7 @@ static CMPIStatus rasd_to_vssd(const CMP return s; } -static CMPIInstance *make_ref(const CMPIObjectPath *ref, - const CMPIInstance *inst, - struct std_assoc_info *info, - struct std_assoc *assoc) -{ - CMPIInstance *refinst = NULL; - - refinst = get_typed_instance(_BROKER, - CLASSNAME(ref), - "VirtualSystemSettingDataComponent", - NAMESPACE(ref)); - - if (refinst != NULL) { - CMPIObjectPath *instop; - - instop = CMGetObjectPath(inst, NULL); - - set_reference(assoc, refinst, ref, instop); - } - - return refinst; -} +LIBVIRT_CIM_DEFAULT_MAKEREF() char* group_component[] = { "Xen_VirtualSystemSettingData", @@ -199,7 +178,6 @@ char* assoc_classname[] = { NULL }; - static struct std_assoc forward = { .source_class = (char**)&group_component, .source_prop = "GroupComponent", From heidieck at linux.vnet.ibm.com Thu Dec 6 09:07:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 06 Dec 2007 11:07:03 +0200 Subject: [Libvirt-cim] [PATCH] SDS: Fixed segfaulting reference(Names) call due to missing assoc_classname Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1196935598 -3600 # Node ID ba4bc35f508573c53e4303ce2e7a9b5299b95f38 # Parent 618509ea5c6089678975cde7f4b5a687aa1e68f0 SDS: Fixed segfaulting reference(Names) call due to missing assoc_classname Signed-off-by: Heidi Eckhart diff -r 618509ea5c60 -r ba4bc35f5085 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Thu Dec 06 11:06:38 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Thu Dec 06 11:06:38 2007 +0100 @@ -365,6 +365,8 @@ static struct std_assoc _vs_to_vssd = { .target_class = (char**)&virtual_system_setting_data, .target_prop = "SettingData", + .assoc_class = (char**)&assoc_classname, + .handler = vs_to_vssd, .make_ref = make_ref }; @@ -375,6 +377,8 @@ static struct std_assoc _vssd_to_vs = { .target_class = (char**)&computer_system, .target_prop = "ManagedElement", + + .assoc_class = (char**)&assoc_classname, .handler = vssd_to_vs, .make_ref = make_ref From heidieck at linux.vnet.ibm.com Thu Dec 6 09:07:16 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 06 Dec 2007 11:07:16 +0200 Subject: [Libvirt-cim] [PATCH] html: Added additional classes to cimv216-interop.mof Message-ID: <30269254841ceed6a250.1196935636@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1196935599 -3600 # Node ID 30269254841ceed6a250ea2b714c594fa30cc19e # Parent ba4bc35f508573c53e4303ce2e7a9b5299b95f38 html: Added additional classes to cimv216-interop.mof These additional classes are necessary to register Xen/KVM ComputerSystem and HostSystem classes to interop. Otherwise Pegasus refuses the registration. Signed-off-by: Heidi Eckhart diff -r ba4bc35f5085 -r 30269254841c doc/libvirt-cim.html --- a/doc/libvirt-cim.html Thu Dec 06 11:06:38 2007 +0100 +++ b/doc/libvirt-cim.html Thu Dec 06 11:06:39 2007 +0100 @@ -300,6 +300,11 @@ below:

#pragma include ("qualifiers.mof")
#pragma include ("qualifiers_optional.mof")
#pragma include ("Core/CIM_ManagedElement.mof")
+#pragma include ("Core/CIM_ManagedSystemElement.mof")
+#pragma include ("Core/CIM_LogicalElement.mof")
+#pragma include ("Core/CIM_EnabledLogicalElement.mof")
+#pragma include ("Core/CIM_System.mof")
+#pragma include ("System/CIM_ComputerSystem.mof")
#pragma include ("Interop/CIM_RegisteredProfile.mof")
#pragma include ("Interop/CIM_RegisteredSubProfile.mof")
#pragma include ("Core/CIM_Dependency.mof")
From heidieck at linux.vnet.ibm.com Thu Dec 6 13:05:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 06 Dec 2007 14:05:03 +0100 Subject: [Libvirt-cim] IMPORTANT: configure Pegasus with "forceProviderProcesses=true" Message-ID: <4757F37F.3030700@linux.vnet.ibm.com> Hi all, due to the changes made to the associations (registering the Virt_ provider for each subclass), it is now very important that Pegasus is configured for "forceProviderProcesses=true". Otherwise only strange things are happening ... ... Heidi -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From danms at us.ibm.com Thu Dec 6 14:28:48 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 06:28:48 -0800 Subject: [Libvirt-cim] IMPORTANT: configure Pegasus with "forceProviderProcesses=true" In-Reply-To: <4757F37F.3030700@linux.vnet.ibm.com> (Heidi Eckhart's message of "Thu, 06 Dec 2007 14:05:03 +0100") References: <4757F37F.3030700@linux.vnet.ibm.com> Message-ID: <87fxyfx5gf.fsf@theine.beaverton.ibm.com> HE> due to the changes made to the associations (registering the Virt_ HE> provider for each subclass), it is now very important that Pegasus HE> is configured for "forceProviderProcesses=true". Otherwise only HE> strange things are happening ... Can you explain why you think this? I have forceProviderProcesses=false and I haven't noticed any weird behavior thus far (aside from the libvirt init race, which is still not fully resolved). There's nothing about the std_association approach that should be any less thread-safe than the "conventional" approach, other than if Pegasus itself has issues with multiple calls into the broker at once. If this is the case, we should be able to work around it by preparing additional context objects as you do when you prepare a thread to run, or we could provide mutual exclusion at the std_association layer. Before I could be convinced that we've got a thread-safety issue, I would want to know what behavior you're seeing, and hear from someone familiar with the Pegasus internals on why what we're doing is not safe. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Dec 6 16:06:30 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Dec 2007 08:06:30 -0800 Subject: [Libvirt-cim] [PATCH] [RFC] #2 - variable renaming in make_ref() of associations In-Reply-To: <87zlwowzyz.fsf@theine.beaverton.ibm.com> References: <87r6i1xdcc.fsf@theine.beaverton.ibm.com> <47570840.7040504@linux.vnet.ibm.com> <87zlwowzyz.fsf@theine.beaverton.ibm.com> Message-ID: <47581E06.7000506@linux.vnet.ibm.com> Dan Smith wrote: > HE> Sadly the current input parameter list of make_ref_t() in struct > HE> std_assoc does not include a broker pointer, which prevents me > HE> from reworking it in your suggested way. > > Ah, right :( > > HE> Maybe you have an idea how to solve this ? > > Perhaps we could have a macro that dispatches the make_reference() > function with the appropriate broker? Maybe something like the > following: > > #define LIBVIRT_CIM_DEFAULT_MAKEREF \ > static CMPIInstance make_ref(const CMPIObjectPath *ref, \ > const CMPIInstance *inst, \ > struct std_assoc_info *info, \ > struct std_assoc *assoc) \ > { \ > return default_make_ref(_BROKER, ref, inst, info, assoc);\ > } > > What do you think? > I think this is a neat idea. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From grendel at linux.vnet.ibm.com Thu Dec 6 15:38:07 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 06 Dec 2007 11:38:07 -0400 Subject: [Libvirt-cim] [PATCH] [CU] Several small fixes for indication_tester.py: Message-ID: <43172447a69a867b00bd.1196959087@wulfgar.pok.ibm.com> # HG changeset patch # User Jay Gagnon # Date 1196959002 18000 # Node ID 43172447a69a867b00bdf1bf8fbed3c50a199fd5 # Parent 8459ef1378807def1f91addfc6ba54fd16a44cf2 [CU] Several small fixes for indication_tester.py: Move #! interpreter line to top (otherwise it is ignored). Add usage message that includes mandatory argument. Exit cleanly with error message when mandatory arg missing. Fix default namespace in indication tester to root/virt. Use OptionParser's way to specify defaults. Remove itest.c Signed-off-by: Jay Gagnon diff -r 8459ef137880 -r 43172447a69a tools/indication_tester.py --- a/tools/indication_tester.py Fri Nov 30 14:14:41 2007 -0800 +++ b/tools/indication_tester.py Thu Dec 06 11:36:42 2007 -0500 @@ -1,5 +1,5 @@ +#!/usr/bin/python # Copyright IBM Corp. 2007 -#!/usr/bin/python # # indication_tester.py - Tool for testing indication subscription and # delivery against a CIMOM @@ -325,22 +325,20 @@ class CIMIndicationSubscription: self.__do_cimpost(self.conn, delete_inst_xml(self.name, "Filter")) def main(): - parser = OptionParser() - parser.add_option("-u", "--url", dest="url", + parser = OptionParser(usage="usage: %prog [options] type") + parser.add_option("-u", "--url", dest="url", default="localhost:5988", help="URL of CIMOM to connect to (host:port)") - parser.add_option("-N", "--ns", dest="ns", - help="Namespace (default is root/ibmsd)") - parser.add_option("-n", "--name", dest="name", + parser.add_option("-N", "--ns", dest="ns", default="root/virt", + help="Namespace (default is root/virt)") + parser.add_option("-n", "--name", dest="name", default="Test", help="Base name for filter, handler, subscription") (options, args) = parser.parse_args() - if not options.url: - options.url = "localhost:5988" - if not options.ns: - options.ns = "root/ibmsd" - if not options.name: - options.name = "Test" - + + if len(args) == 0: + print "Fatal: no indication type provided." + sys.exit(1) + sub = CIMIndicationSubscription(options.name, args[0], options.ns) sub.subscribe(options.url) print "Watching for %s" % args[0] diff -r 8459ef137880 -r 43172447a69a tools/itest.c --- a/tools/itest.c Fri Nov 30 14:14:41 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,609 +0,0 @@ -/* - * Copyright IBM Corp. 2007 - * - * Authors: - * Dan Smith - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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 - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int tcp_incoming(int port) -{ - struct sockaddr_in srvaddr; - int s = -1; - int ret; - - s = socket(AF_INET, SOCK_STREAM, 0); - if (s < 0) { - perror("socket"); - return -1; - } - - memset(&srvaddr, 0, sizeof(srvaddr)); - - srvaddr.sin_family = AF_INET; - srvaddr.sin_addr.s_addr = htonl(INADDR_ANY); - srvaddr.sin_port = htons(port); - - ret = bind(s, (struct sockaddr *)&srvaddr, sizeof(srvaddr)); - if (ret) { - perror("bind"); - goto err; - } - - ret = listen(s, 1); - if (ret) { - perror("listen"); - goto err; - } - - return s; - - err: - close(s); - return -1; -} - -static int create_filter(FILE *pipe, - const char *name, - const char *type, - const char *ns) -{ - int ret = 0; - char *xml = NULL; - const char *filter_fmt = " \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - CIM_ComputerSystem \ - \ - \ - localhost.localdomain \ - \ - \ - CIM_IndicationFilter \ - \ - \ - %sFilter \ - \ - \ - SELECT * FROM %s \ - \ - \ - \ - WQL \ - \ - \ - %s \ - \ - \ - \ - \ - \ - \ -"; - - ret = asprintf(&xml, filter_fmt, name, type, ns); - if (ret == -1) - goto out; - - ret = fwrite(xml, strlen(xml), 1, pipe); - ret = (ret == strlen(xml)); - - out: - free(xml); - - return ret; -} - -static int create_handler(FILE *pipe, int port, const char *name) -{ - int ret = 0; - char *xml = NULL; - const char * handler_fmt = " \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - CIM_ComputerSystem \ - \ - \ - localhost.localdomain \ - \ - \ - CIM_IndicationHandlerCIMXML \ - \ - \ - %sHandler \ - \ - \ - localhost:%i \ - \ - \ - \ - \ - \ - \ -"; - - ret = asprintf(&xml, handler_fmt, name, port); - if (ret == -1) - return 0; - - ret = fwrite(xml, strlen(xml), 1, pipe); - ret = (ret == strlen(xml)); - - free(xml); - - return ret; -} - -static int create_subscription(FILE *pipe, const char *name) -{ - int ret = 0; - char *xml = NULL; - const char *sub_fmt = " \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - CIM_ComputerSystem \ - \ - \ - \ - \ - localhost.localdomain \ - \ - \ - \ - \ - CIM_IndicationFilter \ - \ - \ - \ - \ - %sFilter \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - CIM_ComputerSystem \ - \ - \ - \ - \ - localhost.localdomain \ - \ - \ - \ - \ - CIM_IndicationHandlerCIMXML \ - \ - \ - \ - \ - %sHandler \ - \ - \ - \ - \ - \ - \ - 2 \ - \ - \ - \ - \ - \ - \ -"; - - ret = asprintf(&xml, sub_fmt, name, name); - if (ret == -1) - goto out; - - ret = fwrite(xml, strlen(xml), 1, pipe); - ret = (ret == strlen(xml)); - - out: - free(xml); - - return ret; -} - -static int delete_inst(FILE *pipe, const char *name, const char *type) -{ - int ret; - char *xml = NULL; - const char *fmt = "\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - CIM_ComputerSystem \ - \ - \ - localhost.localdomain \ - \ - \ - CIM_Indication%sCIMXML \ - \ - \ - %s%s \ - \ - \ - \ - \ - \ - \ -"; - - ret = asprintf(&xml, fmt, type, type, name, type); - if (ret == -1) - return 0; - - ret = fwrite(xml, strlen(xml), 1, pipe); - ret = (ret == strlen(xml)); - - free(xml); - - return ret; -} - -static int delete_subscription(FILE *pipe, char *name) -{ - int ret; - char *xml = NULL; - const char *fmt = "\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - CIM_ComputerSystem \ - \ - \ - \ - \ - localhost.localdomain \ - \ - \ - \ - \ - CIM_IndicationFilter \ - \ - \ - \ - \ - %sFilter \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - CIM_ComputerSystem \ - \ - \ - \ - \ - localhost.localdomain \ - \ - \ - \ - \ - CIM_IndicationHandlerCIMXML \ - \ - \ - \ - \ - %sHandler \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ -"; - - ret = asprintf(&xml, fmt, name, name); - if (ret == -1) - return 0; - - ret = fwrite(xml, strlen(xml), 1, pipe); - ret = (ret == strlen(xml)); - - free(xml); - - return 1; -} - -int interrupted; - -static int monitor_indications(int fd, int howmany) -{ - int i; - char buf[4096]; - struct sockaddr saddr; - unsigned int len; - - int flags; - - flags = fcntl(fd, F_GETFD); - fcntl(fd, F_SETFD, flags | O_NONBLOCK); - - interrupted = 0; - - for (i = 0; i < howmany; i++) { - int ret; - int s; - fd_set fds; - - if (interrupted) - break; - - FD_ZERO(&fds); - FD_SET(fd, &fds); - - ret = select(fd+1, &fds, NULL, NULL, NULL); - if (ret <= 0) - continue; - - s = accept(fd, &saddr, &len); - if (s < 0) - continue; - - ret = read(s, buf, sizeof(buf)); - if (ret > 0) - printf("Got indication\n"); - - close(s); - } - - return i; -} - -static void interrupt(int sig) -{ - interrupted = 1; -} - -struct config { - char *type; - int port; - char *name; - char *ns; - int iter; - int debug; -}; - -static void usage(char *name) -{ - printf("Usage:\n" - "%s [OPTIONS]\n" - "\n" - " -t,--type=class Indication type to watch for\n" - " -p,--port=1234 TCP port to listen to\n" - " -n,--name=foo Indication instance name base\n" - " -N,--ns=foo Namespace\n" - " -i,--iter=1 Number of instances to receive before exit\n" - " -d,--debug Enable debugging\n" - " -h,--help This help text\n", - name); -} - -static int parse_args(int argc, char **argv, struct config *config) -{ - int idx; - static struct option opts[] = { - {"type", 1, 0, 't'}, - {"port", 1, 0, 'p'}, - {"name", 1, 0, 'n'}, - {"ns", 1, 0, 'N'}, - {"iter", 1, 0, 'i'}, - {"help", 0, 0, 'h'}, - {"debug", 0, 0, 'd'}, - {0, 0, 0, 0}}; - - config->type = "CIM_InstCreation"; - config->port = 1234; - config->name = "TestIndication"; - config->ns = "root/ibmsd"; - config->iter = 1; - config->debug = 0; - - while (1) { - int c; - - c = getopt_long(argc, argv, "t:p:n:N:i:hd", opts, &idx); - if (c == -1) - break; - - switch (c) { - case 't': - config->type = optarg; - break; - - case'n': - config->name = optarg; - break; - - case 'N': - config->ns = optarg; - break; - - case 'p': - config->port = atoi(optarg); - break; - - case 'i': - config->iter = atoi(optarg); - break; - - case 'd': - config->debug = 1; - break; - - case 'h': - case '?': - usage(argv[0]); - return 0; - break; - }; - } - - return 1; -} - -#define WBEMCAT(f) \ - if (config.debug) \ - pipe = popen("wbemcat", "w"); \ - else \ - pipe = popen("wbemcat >/dev/null 2>&1", "w"); \ - f; \ - ret = fclose(pipe); - -int main(int argc, char **argv) -{ - int s; - FILE *pipe; - int ret; - struct config config; - - if (!parse_args(argc, argv, &config)) - return 1; - - signal(SIGINT, interrupt); - signal(SIGTERM, interrupt); - - s = tcp_incoming(config.port); - if (s < 0) { - printf("Unable to listen on port %i\n", config.port); - return 1; - } - - WBEMCAT(create_filter(pipe, config.name, config.type, config.ns)); - if (ret) { - printf("Failed to create filter\n"); - return 1; - } - - WBEMCAT(create_handler(pipe, config.port, config.name)); - if (ret) { - printf("Failed to create handler\n"); - goto out1; - } - - WBEMCAT(create_subscription(pipe, config.name)); - if (ret) { - printf("Failed to create subscription\n"); - goto out2; - } - - monitor_indications(s, config.iter); - - WBEMCAT(delete_subscription(pipe, config.name)); - out2: - WBEMCAT(delete_inst(pipe, config.name, "Handler")); - out1: - WBEMCAT(delete_inst(pipe, config.name, "Filter")); - - close(s); - - return 0; -} - -/* - * Local Variables: - * mode: C - * c-set-style: "K&R" - * tab-width: 8 - * c-basic-offset: 8 - * indent-tabs-mode: nil - * End: - */ From grendel at linux.vnet.ibm.com Thu Dec 6 16:54:29 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 06 Dec 2007 11:54:29 -0500 Subject: [Libvirt-cim] [PATCH] SDS: Fixed segfaulting reference(Names) call due to missing assoc_classname In-Reply-To: References: Message-ID: <47582945.5000300@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1196935598 -3600 > # Node ID ba4bc35f508573c53e4303ce2e7a9b5299b95f38 > # Parent 618509ea5c6089678975cde7f4b5a687aa1e68f0 > SDS: Fixed segfaulting reference(Names) call due to missing assoc_classname > Signed-off-by: Heidi Eckhart > > diff -r 618509ea5c60 -r ba4bc35f5085 src/Virt_SettingsDefineState.c > --- a/src/Virt_SettingsDefineState.c Thu Dec 06 11:06:38 2007 +0100 > +++ b/src/Virt_SettingsDefineState.c Thu Dec 06 11:06:38 2007 +0100 > @@ -365,6 +365,8 @@ static struct std_assoc _vs_to_vssd = { > .target_class = (char**)&virtual_system_setting_data, > .target_prop = "SettingData", > > + .assoc_class = (char**)&assoc_classname, > + > .handler = vs_to_vssd, > .make_ref = make_ref > }; > @@ -375,6 +377,8 @@ static struct std_assoc _vssd_to_vs = { > > .target_class = (char**)&computer_system, > .target_prop = "ManagedElement", > + > + .assoc_class = (char**)&assoc_classname, > > .handler = vssd_to_vs, > .make_ref = make_ref > > > Well, we certainly don't want segfaults. Nice catch. +1 -- -Jay From grendel at linux.vnet.ibm.com Thu Dec 6 16:57:05 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 06 Dec 2007 11:57:05 -0500 Subject: [Libvirt-cim] [PATCH] html: Added additional classes to cimv216-interop.mof In-Reply-To: <30269254841ceed6a250.1196935636@localhost.localdomain> References: <30269254841ceed6a250.1196935636@localhost.localdomain> Message-ID: <475829E1.7070501@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1196935599 -3600 > # Node ID 30269254841ceed6a250ea2b714c594fa30cc19e > # Parent ba4bc35f508573c53e4303ce2e7a9b5299b95f38 > html: Added additional classes to cimv216-interop.mof > > These additional classes are necessary to register Xen/KVM > ComputerSystem and HostSystem classes to interop. Otherwise > Pegasus refuses the registration. > Signed-off-by: Heidi Eckhart > > diff -r ba4bc35f5085 -r 30269254841c doc/libvirt-cim.html > --- a/doc/libvirt-cim.html Thu Dec 06 11:06:38 2007 +0100 > +++ b/doc/libvirt-cim.html Thu Dec 06 11:06:39 2007 +0100 > @@ -300,6 +300,11 @@ below:

> #pragma include ("qualifiers.mof")
> #pragma include ("qualifiers_optional.mof")
> #pragma include ("Core/CIM_ManagedElement.mof")
> +#pragma include ("Core/CIM_ManagedSystemElement.mof")
> +#pragma include ("Core/CIM_LogicalElement.mof")
> +#pragma include ("Core/CIM_EnabledLogicalElement.mof")
> +#pragma include ("Core/CIM_System.mof")
> +#pragma include ("System/CIM_ComputerSystem.mof")
> #pragma include ("Interop/CIM_RegisteredProfile.mof")
> #pragma include ("Interop/CIM_RegisteredSubProfile.mof")
> #pragma include ("Core/CIM_Dependency.mof")
> Looks syntactically sound. I don't recognize a couple of those classes as dual-namespace ones, but I'm not going to second guess our CIM Compliance Officer on that. :) +1 -- -Jay From kaitlin at linux.vnet.ibm.com Thu Dec 6 16:57:38 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Dec 2007 08:57:38 -0800 Subject: [Libvirt-cim] [PATCH] Introduce generic LIBVIRT_CIM_DEFAULT_MAKEREF macro In-Reply-To: <618509ea5c6089678975.1196935614@localhost.localdomain> References: <618509ea5c6089678975.1196935614@localhost.localdomain> Message-ID: <47582A02.10306@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1196935598 -3600 > # Node ID 618509ea5c6089678975cde7f4b5a687aa1e68f0 > # Parent d9af4651f76314647dbda82f5ccf3d926ce9dc05 > Introduce generic LIBVIRT_CIM_DEFAULT_MAKEREF macro > > Moved the content of association's make_ref() to > make_reference() in libxkutil to generalize it. The > make_reference can be used via > LIBVIRT_CIM_DEFAULT_MAKEREF macro by each association. > Reduces lines of code per provider. > > Updated all association providers to make use of > make_reference() and LIBVIRT_CIM_DEFAULT_MAKEREF. > I did a quick test of every provider modified. Looks good. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Thu Dec 6 17:09:44 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:09:44 -0800 Subject: [Libvirt-cim] [PATCH] html: Added additional classes to cimv216-interop.mof In-Reply-To: <30269254841ceed6a250.1196935636@localhost.localdomain> (Heidi Eckhart's message of "Thu, 06 Dec 2007 11:07:16 +0200") References: <30269254841ceed6a250.1196935636@localhost.localdomain> Message-ID: <878x47agx3.fsf@theine.beaverton.ibm.com> HE> # HG changeset patch HE> # User Heidi Eckhart HE> # Date 1196935599 -3600 HE> # Node ID 30269254841ceed6a250ea2b714c594fa30cc19e HE> # Parent ba4bc35f508573c53e4303ce2e7a9b5299b95f38 HE> html: Added additional classes to cimv216-interop.mof I'm actually working up a patch to automate installation of the base schema, which should render the documentation about how to do it irrelevant. I've incorporated your additional classes below into my patch and will be sending it out shortly for comments. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Dec 6 17:15:42 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Dec 2007 09:15:42 -0800 Subject: [Libvirt-cim] [PATCH] html: Added additional classes to cimv216-interop.mof In-Reply-To: <475829E1.7070501@linux.vnet.ibm.com> References: <30269254841ceed6a250.1196935636@localhost.localdomain> <475829E1.7070501@linux.vnet.ibm.com> Message-ID: <47582E3E.2060800@linux.vnet.ibm.com> Jay Gagnon wrote: >> --- a/doc/libvirt-cim.html Thu Dec 06 11:06:38 2007 +0100 >> +++ b/doc/libvirt-cim.html Thu Dec 06 11:06:39 2007 +0100 >> @@ -300,6 +300,11 @@ below:

>> #pragma include ("qualifiers.mof")
>> #pragma include ("qualifiers_optional.mof")
>> #pragma include ("Core/CIM_ManagedElement.mof")
>> +#pragma include ("Core/CIM_ManagedSystemElement.mof")
>> +#pragma include ("Core/CIM_LogicalElement.mof")
>> +#pragma include ("Core/CIM_EnabledLogicalElement.mof")
>> +#pragma include ("Core/CIM_System.mof")
>> +#pragma include ("System/CIM_ComputerSystem.mof")
>> #pragma include ("Interop/CIM_RegisteredProfile.mof")
>> #pragma include ("Interop/CIM_RegisteredSubProfile.mof")
>> #pragma include ("Core/CIM_Dependency.mof")
>> >> > > Looks syntactically sound. I don't recognize a couple of those classes > as dual-namespace ones, but I'm not going to second guess our CIM > Compliance Officer on that. :) +1 > For my own curiosity - I'm not sure why CIM_EnabledLogicalElement.mof and CIM_Dependency.mof need to be added. I understand the need for the others though. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Thu Dec 6 16:28:16 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:28:16 -0700 Subject: [Libvirt-cim] [PATCH] Fix missing migration header for distribution Message-ID: <9645be7b079b882978e9.1196962096@theine> # HG changeset patch # User Dan Smith # Date 1196959081 28800 # Node ID 9645be7b079b882978e9ef636c128fef95967497 # Parent d9af4651f76314647dbda82f5ccf3d926ce9dc05 Fix missing migration header for distribution Signed-off-by: Dan Smith diff -r d9af4651f763 -r 9645be7b079b src/Makefile.am --- a/src/Makefile.am Wed Dec 05 09:42:26 2007 +0100 +++ b/src/Makefile.am Thu Dec 06 08:38:01 2007 -0800 @@ -15,7 +15,9 @@ noinst_HEADERS = profiles.h svpc_types.h Virt_SettingsDefineCapabilities.h \ Virt_VirtualSystemManagementCapabilities.h \ Virt_VirtualSystemManagementService.h \ - Virt_VSSD.h + Virt_VSSD.h \ + Virt_VSMigrationCapabilities.h \ + Virt_VSMigrationService.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la From danms at us.ibm.com Thu Dec 6 16:30:10 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:30:10 -0700 Subject: [Libvirt-cim] [PATCH] Rpm changes, per Fedora package review process Message-ID: <84aa3e272c6d8195ce07.1196962210@theine> # HG changeset patch # User Dan Smith # Date 1196962105 28800 # Node ID 84aa3e272c6d8195ce07dd3a54bc8743fd771945 # Parent 9645be7b079b882978e9ef636c128fef95967497 Rpm changes, per Fedora package review process Signed-off-by: Dan Smith diff -r 9645be7b079b -r 84aa3e272c6d libvirt-cim.spec.in --- a/libvirt-cim.spec.in Thu Dec 06 08:38:01 2007 -0800 +++ b/libvirt-cim.spec.in Thu Dec 06 09:28:25 2007 -0800 @@ -4,10 +4,10 @@ Name: libvirt-cim Name: libvirt-cim Version: @PACKAGE_VERSION@ Release: 1%{?dist}%{?extra_release} -License: LGPL +License: LGPLv2+ Group: Development/Libraries Source: libvirt-cim-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/CIM/ Requires: libxml2 Requires: libvirt >= 0.2.3 @@ -26,23 +26,23 @@ platforms with a single provider. %prep %setup -q +chmod -x src/* libxkutil/* schema/* %build %configure --disable-werror -make +make %{?_smp_mflags} %install -rm -fr %{buildroot} +rm -fr $RPM_BUILD_ROOT -%makeinstall PROVIDERDIR=%{buildroot}%{_libdir}/cmpi -cp provider-register.sh %{buildroot}%{_datadir}/libvirt-cim/ +make DESTDIR=$RPM_BUILD_ROOT install rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.a %clean -rm -fr %{buildroot} +rm -fr $RPM_BUILD_ROOT %pre %define REGISTRATION %{_datadir}/%{name}/*.registration @@ -64,8 +64,7 @@ rm -fr %{buildroot} -n /@CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} || true -%postun -/sbin/ldconfig +%postun -p /sbin/ldconfig %files %defattr(-, root, root) From kaitlin at linux.vnet.ibm.com Thu Dec 6 17:39:51 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Dec 2007 09:39:51 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Several small fixes for indication_tester.py: In-Reply-To: <43172447a69a867b00bd.1196959087@wulfgar.pok.ibm.com> References: <43172447a69a867b00bd.1196959087@wulfgar.pok.ibm.com> Message-ID: <475833E7.9070502@linux.vnet.ibm.com> Jay Gagnon wrote: > # HG changeset patch > # User Jay Gagnon > # Date 1196959002 18000 > # Node ID 43172447a69a867b00bdf1bf8fbed3c50a199fd5 > # Parent 8459ef1378807def1f91addfc6ba54fd16a44cf2 > [CU] Several small fixes for indication_tester.py: > > Move #! interpreter line to top (otherwise it is ignored). > Add usage message that includes mandatory argument. > Exit cleanly with error message when mandatory arg missing. > Fix default namespace in indication tester to root/virt. > Use OptionParser's way to specify defaults. > Remove itest.c > I'm not familiar with indication_tester.py, but these changes look sound. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Thu Dec 6 16:40:00 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:40:00 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] Add automated base schema installation Message-ID: This set adds support for automated base schema installation. This will be handy for users of the source tree, as well as required for proper installation via RPM. I have only tested with Pegasus, so sfcb testing would be appreciated. The first patch adds the schema patch and interop mof. The second adds the installation script. The third makes the required changes to the build system to fetch the CIM schema zip during build. Testing can be easily accomplished by running "make preinstall" after building. Testing of the whole process as part of the RPM install would be good too. For Pegasus, remove the entire /var/lib/Pegasus/repository/root#virt directory before testing. For SFCB, removing /usr/local/share/sfcb/CIM/* should be sufficient. After preinstall, make sure postinstall works and that the providers load and work. / From danms at us.ibm.com Thu Dec 6 16:40:02 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:40:02 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Add base schema installation script In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1196962499 28800 # Node ID f19a5921a4996f3babd6ab3d4cd5b4c523da2bfd # Parent 0fd998389d0260fd54af8c7b9005f5a0fc402b4d Add base schema installation script Signed-off-by: Dan Smith diff -r 0fd998389d02 -r f19a5921a499 base_schema/install_base_schema.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/install_base_schema.sh Thu Dec 06 09:34:59 2007 -0800 @@ -0,0 +1,89 @@ +#!/bin/bash -x + +DATA="$1" +NS=root/virt +CIMOM=pegasus + +TMPDIR=$(mktemp -d /tmp/cim_schema.XXXXX) + +unpack_schema() { + (cd ${TMPDIR} && unzip ${DATA}/cimv*-MOFs.zip) >/dev/null 2>&1 +} + +fix_schema() { + (cd ${TMPDIR} && patch -p0 < ${DATA}/fix_schema.patch) >/dev/null 2>&1 + cp -a ${DATA}/cimv216-interop.mof ${TMPDIR} +} + +detect_peg_repo() { + dirs="$PEGASUS_HOME /var/lib/Pegasus /var/lib/pegasus /usr/local/var/lib/pegasus /var/local/lib/pegasus /var/opt/tog-pegasus" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d + return + fi + done +} + +detect_sfcb_dir() { + dirs="SFCB_DIR /usr/local/share/sfcb /usr/share/sfcb" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d; + return + fi + done +} + +install_schema_pegasus() { + local repo=$(detect_peg_repo) + + if [ -z "$repo" ]; then + echo "Unable to determine Pegasus repository path" + echo "set PEGASUS_HOME" + return + fi + + cd ${TMPDIR} + + cimmofl -uc -aEV -R$repo -n $NS cimv*.mof + cimmofl -uc -aEV -R$repo -n $NS qualifiers.mof + cimmofl -uc -aEV -R$repo -n $NS qualifiers_optional.mof + cimmofl -uc -aEV -R$repo -n /root/interop cimv*-interop.mof +} + +install_schema_sfcb() { + local dir=$(detect_sfcb_dir) + + if [ ! mkdir ${dir}/CIM ]; then + echo "Unable to determine SFCB directory" + echo "set SFCB_DIR" + return + fi + + mv ${TMPDIR}/cimv*.mof ${TMPDIR}/CIM_Schema.mof + cp -ra ${TMPDIR}/* ${dir} + sfcbrepos +} + +if [ -z "$1" ]; then + echo "Usage: $0 [source_dir]" + exit 1 +fi + +(unpack_schema) +(fix_schema) + +case "$CIMOM" in + sfcb) + (install_schema_sfcb) + ;; + pegasus) + (install_schema_pegasus) + ;; + *) + echo ERROR: Unknown CIMOM: $CIMOM + ;; +esac From danms at us.ibm.com Thu Dec 6 16:40:03 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:40:03 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Build support for base schema installation In-Reply-To: Message-ID: <81aecd2d6a83cacf8e93.1196962803@theine> # HG changeset patch # User Dan Smith # Date 1196962511 28800 # Node ID 81aecd2d6a83cacf8e939b3777fd159cb421ba3f # Parent f19a5921a4996f3babd6ab3d4cd5b4c523da2bfd Build support for base schema installation Signed-off-by: Dan Smith diff -r f19a5921a499 -r 81aecd2d6a83 Makefile.am --- a/Makefile.am Thu Dec 06 09:34:59 2007 -0800 +++ b/Makefile.am Thu Dec 06 09:35:11 2007 -0800 @@ -1,5 +1,5 @@ # Copyright IBM Corp. 2007 -SUBDIRS = libxkutil src doc +SUBDIRS = libxkutil src doc base_schema MOFS = \ schema/ComputerSystem.mof \ @@ -89,6 +89,9 @@ EXTRA_DIST = schema $(pkgdata_DATA) $(pk libvirt-cim.spec.in libvirt-cim.spec \ doc/CodingStyle doc/SubmittingPatches +preinstall: + sh -x base_schema/install_base_schema.sh `pwd`/base_schema + # Un/Register the providers and class definitions from/to the current CIMOM. # @CIMSERVER@ is set by the configure script postinstall: diff -r f19a5921a499 -r 81aecd2d6a83 base_schema/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/Makefile.am Thu Dec 06 09:35:11 2007 -0800 @@ -0,0 +1,9 @@ +CIM_SCHEMA_VER = 216 +CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experimental +CIM_SCHEMA_ZIP = cimv$(CIM_SCHEMA_REL)-MOFs.zip + +dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop.mof +dist_pkgdata_SCRIPTS = install_base_schema.sh + +$(CIM_SCHEMA_ZIP): + wget http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCHEMA_ZIP) \ No newline at end of file diff -r f19a5921a499 -r 81aecd2d6a83 configure.ac --- a/configure.ac Thu Dec 06 09:34:59 2007 -0800 +++ b/configure.ac Thu Dec 06 09:35:11 2007 -0800 @@ -87,6 +87,8 @@ AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bi # Autogenerate the Makefile AC_CONFIG_FILES([ + base_schema/install_base_schema.sh + base_schema/Makefile libxkutil/Makefile libxkutil/tests/Makefile src/Makefile diff -r f19a5921a499 -r 81aecd2d6a83 libvirt-cim.spec.in --- a/libvirt-cim.spec.in Thu Dec 06 09:34:59 2007 -0800 +++ b/libvirt-cim.spec.in Thu Dec 06 09:35:11 2007 -0800 @@ -55,6 +55,8 @@ rm -fr $RPM_BUILD_ROOT %post /sbin/ldconfig +%{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} + %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n /@CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} || true @@ -77,6 +79,8 @@ rm -fr $RPM_BUILD_ROOT %{_datadir}/libvirt-cim/*.sh %{_datadir}/libvirt-cim/*.mof %{_datadir}/libvirt-cim/*.registration +%{_datadir}/libvirt-cim/fix_schema.patch +%{_datadir}/libvirt-cim/cimv*-MOFs.zip %changelog * Fri Oct 26 2007 Daniel Veillard - 0.1-1 From danms at us.ibm.com Thu Dec 6 16:40:01 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:40:01 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Add base schema support files for automated installation In-Reply-To: Message-ID: <0fd998389d0260fd54af.1196962801@theine> # HG changeset patch # User Dan Smith # Date 1196962461 28800 # Node ID 0fd998389d0260fd54af8c7b9005f5a0fc402b4d # Parent 84aa3e272c6d8195ce07dd3a54bc8743fd771945 Add base schema support files for automated installation Signed-off-by: Dan Smith diff -r 84aa3e272c6d -r 0fd998389d02 base_schema/cimv216-interop.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/cimv216-interop.mof Thu Dec 06 09:34:21 2007 -0800 @@ -0,0 +1,15 @@ +#pragma locale ("en_US") +#pragma include ("qualifiers.mof") +#pragma include ("qualifiers_optional.mof") +#pragma include ("Core/CIM_ManagedElement.mof") +#pragma include ("Core/CIM_ManagedSystemElement.mof") +#pragma include ("Core/CIM_LogicalElement.mof") +#pragma include ("Core/CIM_EnabledLogicalElement.mof") +#pragma include ("Core/CIM_System.mof") +#pragma include ("System/CIM_ComputerSystem.mof") +#pragma include ("Interop/CIM_RegisteredProfile.mof") +#pragma include ("Interop/CIM_RegisteredSubProfile.mof") +#pragma include ("Core/CIM_Dependency.mof") +#pragma include ("Interop/CIM_ElementConformsToProfile.mof") +#pragma include ("Interop/CIM_ReferencedProfile.mof") +#pragma include ("Interop/CIM_SubProfileRequiresProfile.mof") diff -r 84aa3e272c6d -r 0fd998389d02 base_schema/fix_schema.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/fix_schema.patch Thu Dec 06 09:34:21 2007 -0800 @@ -0,0 +1,22 @@ +--- cimv216.mof 2007-08-30 16:19:12.000000000 -0700 ++++ cimv216-new.mof 2007-12-05 12:45:56.000000000 -0800 +@@ -505,7 +505,7 @@ + #pragma include ("Policy/CIM_PolicySetValidityPeriod.mof") + #pragma include ("Policy/CIM_PublicPrivateKeyAuthentication.mof") + #pragma include ("Policy/CIM_SharedSecretAuthentication.mof") +-#pragma include ("Security/CIM_SecurityIndication.mof") ++//#pragma include ("Security/CIM_SecurityIndication.mof") + #pragma include ("Support/PRS_Activity.mof") + #pragma include ("Support/PRS_ActivityResource.mof") + #pragma include ("Support/PRS_ActivityTransaction.mof") +@@ -726,8 +726,8 @@ + #pragma include ("Policy/CIM_PolicyActionStructure.mof") + #pragma include ("Policy/CIM_PolicyConditionInPolicyCondition.mof") + #pragma include ("Policy/CIM_PolicyConditionInPolicyRule.mof") +-#pragma include ("Security/CIM_IPNetworkSecurityIndication.mof") +-#pragma include ("Security/CIM_IPPacketFilterIndication.mof") ++//#pragma include ("Security/CIM_IPNetworkSecurityIndication.mof") ++//#pragma include ("Security/CIM_IPPacketFilterIndication.mof") + #pragma include ("Support/PRS_ActivityContact.mof") + #pragma include ("Support/PRS_AdminAssociation.mof") + #pragma include ("Support/PRS_AdministrativeContact.mof") From danms at us.ibm.com Thu Dec 6 17:48:25 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 09:48:25 -0800 Subject: [Libvirt-cim] [PATCH] Introduce generic LIBVIRT_CIM_DEFAULT_MAKEREF macro In-Reply-To: <618509ea5c6089678975.1196935614@localhost.localdomain> (Heidi Eckhart's message of "Thu, 06 Dec 2007 11:06:54 +0200") References: <618509ea5c6089678975.1196935614@localhost.localdomain> Message-ID: <874pevaf4m.fsf@theine.beaverton.ibm.com> HE> 14 files changed, 77 insertions(+), 321 deletions(-) Can't argue with that! Applied :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Thu Dec 6 17:18:43 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 10:18:43 -0700 Subject: [Libvirt-cim] [PATCH] Fix missing InstanceID in ResourcePoolConfigurationCapabilities Message-ID: <25193cc30daf4db213e9.1196965123@theine> # HG changeset patch # User Dan Smith # Date 1196965106 28800 # Node ID 25193cc30daf4db213e989ee04573b7765785405 # Parent ebc42d00406a9800662470bb47fe5196e34c99a3 Fix missing InstanceID in ResourcePoolConfigurationCapabilities Signed-off-by: Dan Smith diff -r ebc42d00406a -r 25193cc30daf src/Virt_ResourcePoolConfigurationCapabilities.c --- a/src/Virt_ResourcePoolConfigurationCapabilities.c Thu Dec 06 10:15:15 2007 -0800 +++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Thu Dec 06 10:18:26 2007 -0800 @@ -60,6 +60,9 @@ static CMPIStatus get_rpc_cap(const CMPI if (inst == NULL) return (CMPIStatus){CMPI_RC_ERR_FAILED, NULL}; + CMSetProperty(inst, "InstanceID", + (CMPIValue *)"RPCC", CMPI_chars); + /* No method currently supported */ *_inst = inst; From grendel at linux.vnet.ibm.com Thu Dec 6 19:03:32 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 06 Dec 2007 14:03:32 -0500 Subject: [Libvirt-cim] [PATCH] Rpm changes, per Fedora package review process In-Reply-To: <84aa3e272c6d8195ce07.1196962210@theine> References: <84aa3e272c6d8195ce07.1196962210@theine> Message-ID: <47584784.6040300@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1196962105 28800 > # Node ID 84aa3e272c6d8195ce07dd3a54bc8743fd771945 > # Parent 9645be7b079b882978e9ef636c128fef95967497 > Rpm changes, per Fedora package review process > > Signed-off-by: Dan Smith > > > Whatever Fedora, wants Fedora gets. I don't really know my way around spec files, but nothing seems out of the ordinary here. Maybe Daniel has an opinion? -- -Jay From danms at us.ibm.com Thu Dec 6 18:05:53 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Dec 2007 11:05:53 -0700 Subject: [Libvirt-cim] [PATCH] [RFC] Cleanup libvirt checks in acinclude.m4 Message-ID: <3c54117986d7f346f42e.1196967953@theine> # HG changeset patch # User Dan Smith # Date 1196967953 28800 # Node ID 3c54117986d7f346f42edd1fd3f0d2b90a1c68d7 # Parent 25193cc30daf4db213e989ee04573b7765785405 [RFC] Cleanup libvirt checks in acinclude.m4 This changes the existing (hard to follow, debug, and change) libvirt detection code with the standard pkg-config method. This gives us an easy version check, as well as access to the package-specified information about CPPFLAGS and LDFLAGS. It also makes us obey the system package search path. This will require a change to any source file that includes libvirt.h, to #include , which is the proper way anyway. If people like this, I'll resubmit with the necessary changes. Signed-off-by: Dan Smith diff -r 25193cc30daf -r 3c54117986d7 acinclude.m4 --- a/acinclude.m4 Thu Dec 06 10:18:26 2007 -0800 +++ b/acinclude.m4 Thu Dec 06 11:05:53 2007 -0800 @@ -325,39 +325,10 @@ AC_DEFUN([_CHECK_LIBVIRT], AC_DEFUN([CHECK_LIBVIRT], [ - AC_MSG_CHECKING(for libvirt package) - LIBVIRT_CPP_FLAGS="$CPPFLAGS" - dnl The standard include paths worked. - _CHECK_LIBVIRT(standard) - if test x"$LIBVIRTDIR" == x ; then - _DIRS_="/usr/include/libvirt \ - /usr/local/include/libvirt" - else - _DIRS_="$LIBVIRTDIR/include/libvirt" - fi - for _DIR_ in $_DIRS_ - do - _cppflags=$CPPFLAGS - _include_LIBVIRT="$_DIR_" - CPPFLAGS="$CPPFLAGS -I$_include_LIBVIRT" - _CHECK_LIBVIRT($_DIR_) - if test "$have_LIBVIRT" == "yes"; then - dnl Found it - AC_MSG_RESULT(yes) - dnl Save the new -I parameter - LIBVIRT_CPP_FLAGS="$CPPFLAGS" - LIBLIBVIRT=-lvirt - break - fi - CPPFLAGS=$_cppflags - done - CPPFLAGS=$LIBVIRT_CPP_FLAGS - AC_SUBST(LIBLIBVIRT) - if test "$have_LIBVIRT" == "no"; then - AC_MSG_ERROR(no. The required libvirt package is missing.) - fi - ] -) + PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) + CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" + LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" + ]) dnl dnl The check for the SBLIM test suite From heidieck at linux.vnet.ibm.com Fri Dec 7 12:52:34 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 07 Dec 2007 13:52:34 +0100 Subject: [Libvirt-cim] IMPORTANT: configure Pegasus with "forceProviderProcesses=true" In-Reply-To: <87fxyfx5gf.fsf@theine.beaverton.ibm.com> References: <4757F37F.3030700@linux.vnet.ibm.com> <87fxyfx5gf.fsf@theine.beaverton.ibm.com> Message-ID: <47594212.9030209@linux.vnet.ibm.com> Dan Smith wrote: > HE> due to the changes made to the associations (registering the Virt_ > HE> provider for each subclass), it is now very important that Pegasus > HE> is configured for "forceProviderProcesses=true". Otherwise only > HE> strange things are happening ... > > Can you explain why you think this? I have > forceProviderProcesses=false and I haven't noticed any weird behavior > thus far (aside from the libvirt init race, which is still not fully > resolved). > These are good news :). > There's nothing about the std_association approach that should be any > less thread-safe than the "conventional" approach, other than if > Pegasus itself has issues with multiple calls into the broker at > once. If this is the case, we should be able to work around it by > preparing additional context objects as you do when you prepare a > thread to run, or we could provide mutual exclusion at the > std_association layer. > > Before I could be convinced that we've got a thread-safety issue, I > would want to know what behavior you're seeing, and hear from someone > familiar with the Pegasus internals on why what we're doing is not > safe. > I was experiencing different behavior with Pegasus between setting forceProviderProcesses to false or true. With set to false, a provider request took around 5 seconds until a first output was printed out on stdout (CU_DEBUG) and none of the association calls have been successful. All request returned with "Handler not found" (CU_DEBUG), which was really strange, as all request have been valid ones. With forceProviderProcesses set to true this behavior disappeared. But after some more extensively testing it returned and also occurred with this setup :(. So if no one else noticed such strange things, its more reasonable that something in my local machine setup is completely broken. I will investigate further into it and hopefully find some explanation for it. Thank you for your feedback. I'm extremely happy to hear, that you haven't encountered similar issues. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From danms at us.ibm.com Fri Dec 7 14:32:14 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 06:32:14 -0800 Subject: [Libvirt-cim] IMPORTANT: configure Pegasus with "forceProviderProcesses=true" In-Reply-To: <47594212.9030209@linux.vnet.ibm.com> (Heidi Eckhart's message of "Fri, 07 Dec 2007 13:52:34 +0100") References: <4757F37F.3030700@linux.vnet.ibm.com> <87fxyfx5gf.fsf@theine.beaverton.ibm.com> <47594212.9030209@linux.vnet.ibm.com> Message-ID: <87ejdymv81.fsf@theine.beaverton.ibm.com> HE> I was experiencing different behavior with Pegasus between setting HE> forceProviderProcesses to false or true. With set to false, a HE> provider request took around 5 seconds until a first output was HE> printed out on stdout (CU_DEBUG) I am *definitely* not seeing that kind of behavior :) HE> and none of the association calls have been successful. All HE> request returned with "Handler not found" (CU_DEBUG), which was HE> really strange, as all request have been valid ones. Actually, both Zhengang and I have seen this behavior, but it was related to all of the association and registration changes that have been flying around recently. A full preuninstall, uninstall, restart the CIMOM, build, install, postinstall, restart CIMOM seemed to clear it up for both of us right away. I'm guessing that Pegasus may have been caching some stale information somewhere. Let us know if the above procedure clears things up. I might also point out that we still appear to have a bit of a libvirt initialization race when forceProviderProcesses=false. I had assumed that Pegasus was loading the providers serially, which does not seem to be the case. Thus, we will probably need to provide a mutex for the thread case in the initialization routine. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Fri Dec 7 17:01:04 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 10:01:04 -0700 Subject: [Libvirt-cim] [PATCH 2 of 5] Change libcmpiutil check in configure to use pkg-config In-Reply-To: Message-ID: <19fe21b48ba3b5841b80.1197050464@theine> # HG changeset patch # User Dan Smith # Date 1196982077 28800 # Node ID 19fe21b48ba3b5841b80a3a6cccdefd6f3ea5e8d # Parent 0a1c811ef3bdc9651166a6259562b7b95f4f7838 Change libcmpiutil check in configure to use pkg-config Signed-off-by: Dan Smith diff -r 0a1c811ef3bd -r 19fe21b48ba3 acinclude.m4 --- a/acinclude.m4 Thu Dec 06 11:52:09 2007 -0800 +++ b/acinclude.m4 Thu Dec 06 15:01:17 2007 -0800 @@ -259,43 +259,12 @@ AC_DEFUN([CHECK_LIBXML2], ] ) -AC_DEFUN([_CHECK_LIBCU_PC], - [ - if pkg-config --exists libcmpiutil; then - CPPFLAGS="$CPPFLAGS `pkg-config --cflags libcmpiutil`" - LDFLAGS="$LDFLAGS `pkg-config --libs libcmpiutil`" - found_libcu=yes - fi - ] -) - -AC_DEFUN([_CHECK_LIBCU_NOPC], - [ - DIRS="/usr /usr/local" - for dir in $DIRS; do - if test -f "${dir}/include/libcmpiutil/libcmpiutil.h"; then - CPPFLAGS="$CPPFLAGS -I${dir}/include/libcmpiutil" - LDFLAGS="$LDFLAGS -lcmpiutil -L${dir}/lib" - found_libcu=yes - fi - done - ] -) - AC_DEFUN([CHECK_LIBCU], [ - _CHECK_LIBCU_PC - if test "x$found_libcu" != "xyes"; then - _CHECK_LIBCU_NOPC - fi - AC_CHECK_LIB(cmpiutil, cu_check_args, [], [ - AC_MSG_ERROR(libcmpiutil not found) - ]) - AC_CHECK_HEADER([libcmpiutil.h], [], [ - AC_MSG_ERROR([libcmpiutil.h not found]) - ]) - ] -) + PKG_CHECK_MODULES([LIBCU], [libcmpiutil >= 0.1]) + CPPFLAGS="$CPPFLAGS $LIBCU_CFLAGS" + LDFLAGS="$LDFLAGS $LIBCU_LIBS" + ]) AC_DEFUN([CHECK_LIBVIRT], [ From danms at us.ibm.com Fri Dec 7 17:01:05 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 10:01:05 -0700 Subject: [Libvirt-cim] [PATCH 3 of 5] Make libxml2 check use pkg-config as well In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1196982080 28800 # Node ID d54e71e6c9e2729d8ce7a5074a1ac50dc0dddb40 # Parent 19fe21b48ba3b5841b80a3a6cccdefd6f3ea5e8d Make libxml2 check use pkg-config as well Signed-off-by: Dan Smith diff -r 19fe21b48ba3 -r d54e71e6c9e2 acinclude.m4 --- a/acinclude.m4 Thu Dec 06 15:01:17 2007 -0800 +++ b/acinclude.m4 Thu Dec 06 15:01:20 2007 -0800 @@ -221,43 +221,12 @@ AC_DEFUN([CHECK_CIMSERVER], ] ) -dnl -dnl The check for the libxml2 library -dnl Sets the LIBXML2DIR variable -dnl - -AC_DEFUN([_CHECK_LIBXML2], -[ - AC_MSG_CHECKING($1) - AC_TRY_LINK( - [ - #include - ], - [ - xmlNodePtr nodeptr; - ], - [ - have_LIBXML2=yes - dnl AC_MSG_RESULT(yes) - ], - [ - have_LIBXML2=no - dnl AC_MSG_RESULT(no) - ]) -]) - AC_DEFUN([CHECK_LIBXML2], [ - AC_MSG_CHECKING(for libxml2 package) - CPPFLAGS="$CPPFLAGS `xml2-config --cflags` " - LDFLAGS="$LDFLAGS `xml2-config --libs` " - dnl The standard include paths worked. - _CHECK_LIBXML2(standard) - if test "$have_LIBXML2" == "no"; then - AC_MSG_ERROR(no. The required libxml2 package is missing.) - fi - ] -) + PKG_CHECK_MODULES([LIBXML], [libxml-2.0]) + CPPFLAGS="$CPPFLAGS $LIBXML_CFLAGS" + LDFLAGS="$LDFLAGS $LIBXML_LDFLAGS" + ]) AC_DEFUN([CHECK_LIBCU], [ From danms at us.ibm.com Fri Dec 7 17:01:03 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 10:01:03 -0700 Subject: [Libvirt-cim] [PATCH 1 of 5] [RFC] Cleanup libvirt checks in acinclude.m4 In-Reply-To: Message-ID: <0a1c811ef3bdc9651166.1197050463@theine> # HG changeset patch # User Dan Smith # Date 1196970729 28800 # Node ID 0a1c811ef3bdc9651166a6259562b7b95f4f7838 # Parent 25193cc30daf4db213e989ee04573b7765785405 [RFC] Cleanup libvirt checks in acinclude.m4 This changes the existing (hard to follow, debug, and change) libvirt detection code with the standard pkg-config method. This gives us an easy version check, as well as access to the package-specified information about CPPFLAGS and LDFLAGS. It also makes us obey the system package search path. Signed-off-by: Dan Smith diff -r 25193cc30daf -r 0a1c811ef3bd acinclude.m4 --- a/acinclude.m4 Thu Dec 06 10:18:26 2007 -0800 +++ b/acinclude.m4 Thu Dec 06 11:52:09 2007 -0800 @@ -297,67 +297,12 @@ AC_DEFUN([CHECK_LIBCU], ] ) -dnl -dnl The check for the libvirt library -dnl Sets the LIBVIRTDIR variable -dnl - -AC_DEFUN([_CHECK_LIBVIRT], -[ - AC_MSG_CHECKING($1) - AC_TRY_LINK( - [ - #include - #include - ], - [ - virConnectPtr connectPtr; - ], - [ - have_LIBVIRT=yes - dnl AC_MSG_RESULT(yes) - ], - [ - have_LIBVIRT=no - dnl AC_MSG_RESULT(no) - ]) -]) - AC_DEFUN([CHECK_LIBVIRT], [ - AC_MSG_CHECKING(for libvirt package) - LIBVIRT_CPP_FLAGS="$CPPFLAGS" - dnl The standard include paths worked. - _CHECK_LIBVIRT(standard) - if test x"$LIBVIRTDIR" == x ; then - _DIRS_="/usr/include/libvirt \ - /usr/local/include/libvirt" - else - _DIRS_="$LIBVIRTDIR/include/libvirt" - fi - for _DIR_ in $_DIRS_ - do - _cppflags=$CPPFLAGS - _include_LIBVIRT="$_DIR_" - CPPFLAGS="$CPPFLAGS -I$_include_LIBVIRT" - _CHECK_LIBVIRT($_DIR_) - if test "$have_LIBVIRT" == "yes"; then - dnl Found it - AC_MSG_RESULT(yes) - dnl Save the new -I parameter - LIBVIRT_CPP_FLAGS="$CPPFLAGS" - LIBLIBVIRT=-lvirt - break - fi - CPPFLAGS=$_cppflags - done - CPPFLAGS=$LIBVIRT_CPP_FLAGS - AC_SUBST(LIBLIBVIRT) - if test "$have_LIBVIRT" == "no"; then - AC_MSG_ERROR(no. The required libvirt package is missing.) - fi - ] -) + PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) + CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" + LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" + ]) dnl dnl The check for the SBLIM test suite diff -r 25193cc30daf -r 0a1c811ef3bd autoconfiscate.sh --- a/autoconfiscate.sh Thu Dec 06 10:18:26 2007 -0800 +++ b/autoconfiscate.sh Thu Dec 06 11:52:09 2007 -0800 @@ -18,5 +18,3 @@ autoconf --force && autoconf --force && echo "You may now run ./configure" -echo "You may now run ./configure LIBVIRTDIR=/usr/local" - diff -r 25193cc30daf -r 0a1c811ef3bd configure.ac --- a/configure.ac Thu Dec 06 10:18:26 2007 -0800 +++ b/configure.ac Thu Dec 06 11:52:09 2007 -0800 @@ -31,7 +31,6 @@ AC_ARG_VAR([CIMSERVER],[the target CIM s ]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be install ed.]) -AC_ARG_VAR([LIBVIRTDIR],[the directory where the libvirt package is installed.]) AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite is installed. ]) @@ -179,7 +178,6 @@ echo "The following configuration option echo "The following configuration options have been selected:" echo " CIMSERVER: " $CIMSERVER echo " PROVIDERDIR: " $PROVIDERDIR -echo " LIBVIRTDIR: " $LIBVIRTDIR echo " TESTSUITE_SUPPORT: " $TESTSUITE_SUPPORT if test x"$TESTSUITEDIR" != x; then echo " TESTSUITEDIR: " $TESTSUITEDIR From danms at us.ibm.com Fri Dec 7 17:01:02 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 10:01:02 -0700 Subject: [Libvirt-cim] [PATCH 0 of 5] Build and configure cleanups Message-ID: This patch set started out as just a change to check for a new-enough version of libvirt on the installed system. It evolved into cleaning up a bunch of the package checks in aclocal.m4, a couple of configure cleanups, and a bunch of changes #include statements to account for changes in how we include package directories (which is correct, as of this set, IMHO). Comments and testing on a variety of platforms would be appreciated. From danms at us.ibm.com Fri Dec 7 17:01:07 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 10:01:07 -0700 Subject: [Libvirt-cim] [PATCH 5 of 5] Fixes to header includes for configure changes In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1196982085 28800 # Node ID b748848e59942b5c47e1a288ee9070306b138a89 # Parent 2b0424012e491d751198cd590b03fcf99c0d6978 Fixes to header includes for configure changes Signed-off-by: Dan Smith diff -r 2b0424012e49 -r b748848e5994 libxkutil/cs_util_instance.c --- a/libxkutil/cs_util_instance.c Thu Dec 06 15:01:23 2007 -0800 +++ b/libxkutil/cs_util_instance.c Thu Dec 06 15:01:25 2007 -0800 @@ -31,7 +31,7 @@ #include #include "cs_util.h" -#include "libcmpiutil.h" +#include int get_domain_list(virConnectPtr conn, virDomainPtr **_list) { diff -r 2b0424012e49 -r b748848e5994 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Thu Dec 06 15:01:23 2007 -0800 +++ b/libxkutil/device_parsing.c Thu Dec 06 15:01:25 2007 -0800 @@ -28,7 +28,7 @@ #include #include -#include +#include #include "device_parsing.h" #include "xmlgen.h" diff -r 2b0424012e49 -r b748848e5994 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Thu Dec 06 15:01:23 2007 -0800 +++ b/libxkutil/misc_util.c Thu Dec 06 15:01:25 2007 -0800 @@ -32,8 +32,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "cs_util.h" diff -r 2b0424012e49 -r b748848e5994 libxkutil/misc_util.h --- a/libxkutil/misc_util.h Thu Dec 06 15:01:23 2007 -0800 +++ b/libxkutil/misc_util.h Thu Dec 06 15:01:25 2007 -0800 @@ -31,8 +31,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include -#include +#include +#include /* Check if the provider is reponsible for the given class: * e.g. Xen is running on the system and KVM_... is asked for, diff -r 2b0424012e49 -r b748848e5994 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Dec 06 15:01:23 2007 -0800 +++ b/libxkutil/xmlgen.c Thu Dec 06 15:01:25 2007 -0800 @@ -29,7 +29,7 @@ #ifndef TEST #include "misc_util.h" -#include "libcmpiutil.h" +#include #include "cmpimacs.h" #endif diff -r 2b0424012e49 -r b748848e5994 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_AllocationCapabilities.c Thu Dec 06 15:01:25 2007 -0800 @@ -25,8 +25,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ComputerSystem.c Thu Dec 06 15:01:25 2007 -0800 @@ -28,13 +28,13 @@ #include #include -#include +#include #include "cs_util.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_invokemethod.h" -#include "std_instance.h" +#include +#include #include "Virt_ComputerSystem.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ComputerSystemIndication.c Thu Dec 06 15:01:25 2007 -0800 @@ -32,9 +32,9 @@ #include -#include +#include #include -#include +#include #include #include "config.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_Device.c --- a/src/Virt_Device.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_Device.c Thu Dec 06 15:01:25 2007 -0800 @@ -29,8 +29,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "cs_util.h" #include "misc_util.h" #include "device_parsing.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_DevicePool.c Thu Dec 06 15:01:25 2007 -0800 @@ -38,8 +38,8 @@ #include "hostres.h" #include "device_parsing.h" -#include -#include +#include +#include #include "Virt_DevicePool.h" #include "svpc_types.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_DevicePool.h --- a/src/Virt_DevicePool.h Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_DevicePool.h Thu Dec 06 15:01:25 2007 -0800 @@ -22,8 +22,8 @@ #define __VIRT_DEVICE_POOL_H #include -#include -#include +#include +#include #include extern char *device_pool_names[]; diff -r 2b0424012e49 -r b748848e5994 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Thu Dec 06 15:01:25 2007 -0800 @@ -27,8 +27,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "cs_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ElementCapabilities.c Thu Dec 06 15:01:25 2007 -0800 @@ -28,9 +28,9 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_association.h" +#include #include "Virt_VirtualSystemManagementCapabilities.h" #include "Virt_EnabledLogicalElementCapabilities.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ElementConformsToProfile.c Thu Dec 06 15:01:25 2007 -0800 @@ -29,10 +29,10 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" #include "profiles.h" -#include "std_association.h" +#include #include "config.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ElementSettingData.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "Virt_VSSD.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" #include "cs_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_HostSystem.c Thu Dec 06 15:01:25 2007 -0800 @@ -27,8 +27,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_HostedDependency.c Thu Dec 06 15:01:25 2007 -0800 @@ -27,8 +27,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "Virt_ComputerSystem.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_HostedResourcePool.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,11 +26,11 @@ #include #include -#include +#include -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_association.h" +#include #include "Virt_HostSystem.h" #include "Virt_DevicePool.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_HostedService.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "Virt_HostSystem.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_RASD.c --- a/src/Virt_RASD.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_RASD.c Thu Dec 06 15:01:25 2007 -0800 @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include "device_parsing.h" #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_RegisteredProfile.c --- a/src/Virt_RegisteredProfile.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_RegisteredProfile.c Thu Dec 06 15:01:25 2007 -0800 @@ -29,8 +29,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "cs_util.h" #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ResourceAllocationFromPool.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,8 +26,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "cs_util.h" #include "device_parsing.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ResourcePoolConfigurationCapabilities.c --- a/src/Virt_ResourcePoolConfigurationCapabilities.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_ResourcePoolConfigurationService.c Thu Dec 06 15:01:25 2007 -0800 @@ -22,9 +22,9 @@ #include "cmpift.h" #include "cmpimacs.h" -#include -#include -#include +#include +#include +#include #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,7 +26,7 @@ #include #include -#include +#include #include "config.h" @@ -34,9 +34,9 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_association.h" +#include #include "device_parsing.h" #include "svpc_types.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_SettingsDefineState.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,8 +26,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "device_parsing.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_SystemDevice.c Thu Dec 06 15:01:25 2007 -0800 @@ -29,11 +29,11 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "device_parsing.h" #include "misc_util.h" #include "cs_util.h" -#include "std_association.h" +#include #include "Virt_ComputerSystem.h" #include "Virt_Device.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_VSMigrationCapabilities.c --- a/src/Virt_VSMigrationCapabilities.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_VSMigrationCapabilities.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,9 +26,9 @@ #include #include -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_instance.h" +#include #include "Virt_VSMigrationCapabilities.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_VSMigrationService.c Thu Dec 06 15:01:25 2007 -0800 @@ -22,16 +22,16 @@ #include #include -#include +#include #include #include #include -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_instance.h" -#include "std_invokemethod.h" +#include +#include #include "Virt_VSMigrationService.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_VSSD.c Thu Dec 06 15:01:25 2007 -0800 @@ -27,8 +27,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "cs_util.h" #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_VSSDComponent.c Thu Dec 06 15:01:25 2007 -0800 @@ -25,8 +25,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "device_parsing.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_VirtualSystemManagementCapabilities.c --- a/src/Virt_VirtualSystemManagementCapabilities.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_VirtualSystemManagementCapabilities.c Thu Dec 06 15:01:25 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Dec 06 15:01:23 2007 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Thu Dec 06 15:01:25 2007 -0800 @@ -35,10 +35,10 @@ #include "device_parsing.h" #include "xmlgen.h" -#include "libcmpiutil.h" -#include "std_invokemethod.h" -#include "std_indication.h" -#include "std_instance.h" +#include +#include +#include +#include #include "misc_util.h" diff -r 2b0424012e49 -r b748848e5994 src/svpc_types.h --- a/src/svpc_types.h Thu Dec 06 15:01:23 2007 -0800 +++ b/src/svpc_types.h Thu Dec 06 15:01:25 2007 -0800 @@ -32,7 +32,7 @@ /* Vendor-specific extension; should be documented somewhere */ #define CIM_VSSD_RECOVERY_PRESERVE 123 -#include +#include #include static inline char *vssd_recovery_action_str(int action) From danms at us.ibm.com Fri Dec 7 17:01:06 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 10:01:06 -0700 Subject: [Libvirt-cim] [PATCH 4 of 5] Clean up configure a little bit In-Reply-To: Message-ID: <2b0424012e491d751198.1197050466@theine> # HG changeset patch # User Dan Smith # Date 1196982083 28800 # Node ID 2b0424012e491d751198cd590b03fcf99c0d6978 # Parent d54e71e6c9e2729d8ce7a5074a1ac50dc0dddb40 Clean up configure a little bit Signed-off-by: Dan Smith diff -r d54e71e6c9e2 -r 2b0424012e49 acinclude.m4 --- a/acinclude.m4 Thu Dec 06 15:01:20 2007 -0800 +++ b/acinclude.m4 Thu Dec 06 15:01:23 2007 -0800 @@ -242,47 +242,6 @@ AC_DEFUN([CHECK_LIBVIRT], LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" ]) -dnl -dnl The check for the SBLIM test suite -dnl Sets the TESTSUITEDIR variable and the TESTSUITE conditional -dnl - -AC_DEFUN([CHECK_TESTSUITE], - [ - AC_MSG_CHECKING(for SBLIM testsuite) - _DIRS="$datadir/sblim-testsuite" - save_exec_prefix=${exec_prefix} - save_prefix=${prefix} - if test xNONE == x${prefix}; then - prefix=/usr/local - fi - if test xNONE == x${exec_prefix}; then - exec_prefix=$prefix - fi - for _name in $_DIRS - do - AC_MSG_CHECKING( $_name ) - _xname=`eval echo $_name` - if test -x $_xname/run.sh ; then - dnl Found it - AC_MSG_RESULT(yes) - if test x"$TESTSUITEDIR" == x; then - TESTSUITEDIR=$_name - fi - AC_SUBST(TESTSUITEDIR) - break; - fi - done - if test x"$TESTSUITEDIR" == x ; then - AC_MSG_RESULT(no) - fi - AM_CONDITIONAL(TESTSUITE,[test x"$TESTSUITEDIR" != x]) - exec_prefix=$save_exec_prefix - prefix=$save_prefix - ] -) - - # A convenience macro that spits out a fail message for a particular test # # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) diff -r d54e71e6c9e2 -r 2b0424012e49 configure.ac --- a/configure.ac Thu Dec 06 15:01:20 2007 -0800 +++ b/configure.ac Thu Dec 06 15:01:23 2007 -0800 @@ -3,7 +3,6 @@ AC_INIT(libvirt CMPI provider, 0.1, danm AC_INIT(libvirt CMPI provider, 0.1, danms at us.ibm.com, libvirt-cim) AC_CONFIG_SRCDIR([src/Virt_ComputerSystem.c]) -#AC_CONFIG_FILES([xen-kvm-cmpi.spec]) AC_CHECK_HEADERS([stdarg.h errno.h]) AC_CHECK_FUNCS([popen pclose fgets asprintf vfprintf fprintf snprintf sscanf]) @@ -31,8 +30,6 @@ AC_ARG_VAR([CIMSERVER],[the target CIM s ]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be install ed.]) -AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite is installed. -]) AC_ARG_WITH([kvm-max-nics], AC_HELP_STRING([--with-kvm-max-nics=X], @@ -98,38 +95,12 @@ AC_CONFIG_FILES([ AM_INIT_AUTOMAKE -# Check for the required C compiler AC_PROG_CC - -# Check for LEX/YACC -AC_PROG_LEX -AC_PROG_YACC - -# Check if the C compiler supports 'const' AC_C_CONST - -# Check for the required libtool AC_PROG_LIBTOOL - -# Check for the required install program AC_PROG_INSTALL - -# Check for some common required headers AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) - -# Check if the system headers conform to ANSI C AC_HEADER_STDC - -# Check for specific add on libraries that we know we'll need -# - libuuid -#AC_CHECK_LIB([uuid], [uuid_generate], [have_uuid=yes], [ -# AC_CHECK_FAIL(libuuid,e2fsprogs-devel) -# ]) - -# - libxenstore -#AC_CHECK_LIB([xenstore], [xs_read], [have_xen=yes], [ -# AC_CHECK_FAIL(libxenstore,xen-devel) -# ]) # Check for the required CMPI header files (this macro is defined in acinclude.m4) CHECK_CMPI @@ -141,25 +112,12 @@ CHECK_PROVIDERDIR # Check for presense of a CIM server (this macro is defined in acinclude.m4) CHECK_CIMSERVER -# Check for presense of libxml2 (this macro defined in acinclude.m4) -AC_CHECK_PROG([found_xml2_config],[xml2-config],[yes]) -AM_CONDITIONAL([found_xml2_config], [test x$found_xml2_config = xyes]) +# Check for presence of libraries +CHECK_LIBVIRT CHECK_LIBXML2 - -# Check for presense of libvirt (this macro is defined in acinclude.m4) -CHECK_LIBVIRT - -# Check for the SBLIM testsuite (this macro is defined in acinclude.m4) -CHECK_TESTSUITE -if test x"$TESTSUITEDIR" == x; then - TESTSUITE_SUPPORT=Disabled -else - TESTSUITE_SUPPORT=Enabled -fi +CHECK_LIBCU CFLAGS_STRICT="-Werror" - -CHECK_LIBCU AC_ARG_ENABLE([werror], [ --enable-werror enable werror on builds [[default=yes]]], @@ -178,10 +136,6 @@ echo "The following configuration option echo "The following configuration options have been selected:" echo " CIMSERVER: " $CIMSERVER echo " PROVIDERDIR: " $PROVIDERDIR -echo " TESTSUITE_SUPPORT: " $TESTSUITE_SUPPORT -if test x"$TESTSUITEDIR" != x; then - echo " TESTSUITEDIR: " $TESTSUITEDIR -fi echo " CPPFLAGS:" $CPPFLAGS echo echo "You can override these values by setting the corresponding" @@ -193,4 +147,3 @@ AC_OUTPUT(libvirt-cim.spec) AC_OUTPUT(libvirt-cim.spec) echo "You may now run make" - From danms at us.ibm.com Fri Dec 7 18:40:27 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 10:40:27 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Add base schema installation script In-Reply-To: (Dan Smith's message of "Thu, 06 Dec 2007 09:40:02 -0700") References: Message-ID: <87k5nql55w.fsf@theine.beaverton.ibm.com> DS> # HG changeset patch DS> # User Dan Smith DS> # Date 1196962499 28800 DS> # Node ID f19a5921a4996f3babd6ab3d4cd5b4c523da2bfd DS> # Parent 0fd998389d0260fd54af8c7b9005f5a0fc402b4d DS> Add base schema installation script Just noticed a couple issues here. DS> +#!/bin/bash -x This shouldn't have -x anymore. However, as complicated of an install process as this is, I think I might add a debug environment variable to enable -x and debug printing because I *know* we're going to run into issues with install. DS> + cimmofl -uc -aEV -R$repo -n $NS cimv*.mof The places where I do this fail because this matches the interop mof as well as the base one. I've fixed this and will send out an updated set. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Fri Dec 7 21:15:41 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Fri, 07 Dec 2007 17:15:41 -0400 Subject: [Libvirt-cim] [PATCH 2 of 2] [CU] Add --dump-xml option to indication_helper so we can see what xml it's using In-Reply-To: Message-ID: <899c73bed1397d077e18.1197065741@wulfgar.pok.ibm.com> # HG changeset patch # User Jay Gagnon # Date 1197065707 18000 # Node ID 899c73bed1397d077e18b638fe5bc69013fb381f # Parent d9cc64a39524abaa5b88d6ac2b94199cdcf0b23e [CU] Add --dump-xml option to indication_helper so we can see what xml it's using. Signed-off-by: Jay Gagnon diff -r d9cc64a39524 -r 899c73bed139 tools/indication_tester.py --- a/tools/indication_tester.py Fri Dec 07 17:09:09 2007 -0500 +++ b/tools/indication_tester.py Fri Dec 07 17:15:07 2007 -0500 @@ -324,6 +324,21 @@ class CIMIndicationSubscription: self.__do_cimpost(self.conn, delete_inst_xml(self.name, "Handler")) self.__do_cimpost(self.conn, delete_inst_xml(self.name, "Filter")) +def dump_xml(name, typ, ns): + filter_str = filter_xml(name, typ, ns) + handler_str = handler_xml(name, 8000) + subscript_str = subscription_xml(name) + del_filter_str = delete_inst_xml(name, "Filter") + del_handler_str = delete_inst_xml(name, "Handler") + del_subscript_str = delete_sub_xml(name) + + print "CreateFilter:\n%s\n" % filter_str + print "DeleteFilter:\n%s\n" % del_filter_str + print "CreateHandler:\n%s\n" % handler_str + print "DeleteHandler:\n%s\n" % del_handler_str + print "CreateSubscription:\n%s\n" % subscript_str + print "DeleteSubscription:\n%s\n" % del_subscript_str + def main(): usage = "usage: %prog [options] provider\nex: %prog CIM_InstModification" parser = OptionParser(usage) @@ -335,12 +350,19 @@ def main(): parser.add_option("-n", "--name", dest="name", default="Test", help="Name for filter, handler, subscription \ (default: Test)") + parser.add_option("-d", "--dump-xml", dest="dump", default=False, + action="store_true", + help="Dump the xml that would be used and quit.") (options, args) = parser.parse_args() if len(args) == 0: print "Fatal: no indication type provided." sys.exit(1) + + if options.dump: + dump_xml(options.name, args[0], options.ns) + sys.exit(0) sub = CIMIndicationSubscription(options.name, args[0], options.ns) sub.subscribe(options.url) From grendel at linux.vnet.ibm.com Fri Dec 7 21:15:40 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Fri, 07 Dec 2007 17:15:40 -0400 Subject: [Libvirt-cim] [PATCH 1 of 2] [CU] Make help output a little more clear, add example In-Reply-To: Message-ID: # HG changeset patch # User Jay Gagnon # Date 1197065349 18000 # Node ID d9cc64a39524abaa5b88d6ac2b94199cdcf0b23e # Parent d09a2f8d14bf7fb9e78480353cb18c54545b9d1d [CU] Make help output a little more clear, add example. Signed-off-by: Jay Gagnon diff -r d09a2f8d14bf -r d9cc64a39524 tools/indication_tester.py --- a/tools/indication_tester.py Thu Dec 06 11:36:42 2007 -0500 +++ b/tools/indication_tester.py Fri Dec 07 17:09:09 2007 -0500 @@ -325,13 +325,16 @@ class CIMIndicationSubscription: self.__do_cimpost(self.conn, delete_inst_xml(self.name, "Filter")) def main(): - parser = OptionParser(usage="usage: %prog [options] type") + usage = "usage: %prog [options] provider\nex: %prog CIM_InstModification" + parser = OptionParser(usage) + parser.add_option("-u", "--url", dest="url", default="localhost:5988", help="URL of CIMOM to connect to (host:port)") parser.add_option("-N", "--ns", dest="ns", default="root/virt", help="Namespace (default is root/virt)") parser.add_option("-n", "--name", dest="name", default="Test", - help="Base name for filter, handler, subscription") + help="Name for filter, handler, subscription \ + (default: Test)") (options, args) = parser.parse_args() From grendel at linux.vnet.ibm.com Fri Dec 7 21:15:39 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Fri, 07 Dec 2007 17:15:39 -0400 Subject: [Libvirt-cim] [PATCH 0 of 2] [CU] Couple of usability tweaks to indication_tester Message-ID: Trying to use indication_tester.py to test my new indication, I realized it wasn't terribly user friendly, so I made a few changes to make it more usable and to help us figure out what went wrong when it doesn't work. From danms at us.ibm.com Fri Dec 7 21:37:40 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 14:37:40 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Add base schema installation script In-Reply-To: Message-ID: <0d80882209b4002da928.1197067060@theine> # HG changeset patch # User Dan Smith # Date 1197066990 28800 # Node ID 0d80882209b4002da9283e4cfe17d48cb1155d45 # Parent 588daf25941e36b540689209bf0c76b1ce08cb32 Add base schema installation script Changes: - Removed explicit -x - Added optional -x and debug dump based on environment variable - Fixed cimv*.mof ambiguity Signed-off-by: Dan Smith diff -r 588daf25941e -r 0d80882209b4 base_schema/install_base_schema.sh.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/install_base_schema.sh.in Fri Dec 07 14:36:30 2007 -0800 @@ -0,0 +1,102 @@ +#!/bin/bash + +DATA="$1" +NS=@CIM_VIRT_NS@ +CIMOM=@CIMSERVER@ + +TMPDIR=$(mktemp -d /tmp/cim_schema.XXXXX) + +if [ ! -z "$CIM_DEBUG" ]; then + set -x + DEBUG="$TMPDIR/log" +else + DEBUG="/dev/null" +fi + +unpack_schema() { + cd ${TMPDIR} && unzip ${DATA}/cimv*-MOFs.zip +} + +fix_schema() { + (cd ${TMPDIR} && patch -p0 < ${DATA}/fix_schema.patch) + cp -a ${DATA}/cimv216-interop_mof ${TMPDIR}/cimv216-interop.mof +} + +detect_peg_repo() { + dirs="$PEGASUS_HOME /var/lib/Pegasus /var/lib/pegasus /usr/local/var/lib/pegasus /var/local/lib/pegasus /var/opt/tog-pegasus" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d + return + fi + done +} + +detect_sfcb_dir() { + dirs="SFCB_DIR /usr/local/share/sfcb /usr/share/sfcb" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d; + return + fi + done +} + +install_schema_pegasus() { + local repo=$(detect_peg_repo) + + if [ -z "$repo" ]; then + echo "Unable to determine Pegasus repository path" + echo "set PEGASUS_HOME" + return + fi + + cd ${TMPDIR} + + cimmofl -uc -aEV -R$repo -n $NS cimv???.mof + cimmofl -uc -aEV -R$repo -n $NS qualifiers.mof + cimmofl -uc -aEV -R$repo -n $NS qualifiers_optional.mof + cimmofl -uc -aEV -R$repo -n /root/interop cimv???-interop.mof +} + +install_schema_sfcb() { + local dir=$(detect_sfcb_dir) + + if [ ! mkdir ${dir}/CIM ]; then + echo "Unable to determine SFCB directory" + echo "set SFCB_DIR" + return + fi + + mv ${TMPDIR}/cimv???.mof ${TMPDIR}/CIM_Schema.mof + cp -ra ${TMPDIR}/* ${dir} + sfcbrepos +} + +if [ -z "$1" ]; then + echo "Usage: $0 [source_dir]" + exit 1 +fi + +(unpack_schema) >>$DEBUG 2>&1 +(fix_schema) >>$DEBUG 2>&1 + +case "$CIMOM" in + sfcb) + (install_schema_sfcb) >>$DEBUG 2>&1 + ;; + pegasus) + (install_schema_pegasus) >>$DEBUG 2>&1 + ;; + *) + echo ERROR: Unknown CIMOM: $CIMOM + ;; +esac + +if [ -f "$DEBUG" ]; then + echo "-- base schema install log begin --" + cat $DEBUG + echo "-- base schema install log end --" +fi \ No newline at end of file From danms at us.ibm.com Fri Dec 7 21:37:39 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 14:37:39 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Add base schema support files for automated installation In-Reply-To: Message-ID: <588daf25941e36b54068.1197067059@theine> # HG changeset patch # User Dan Smith # Date 1197066416 28800 # Node ID 588daf25941e36b540689209bf0c76b1ce08cb32 # Parent 0f3d28e6d2ed153c5b610b103687dc7f6faf6d30 Add base schema support files for automated installation Signed-off-by: Dan Smith diff -r 0f3d28e6d2ed -r 588daf25941e base_schema/cimv216-interop_mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/cimv216-interop_mof Fri Dec 07 14:26:56 2007 -0800 @@ -0,0 +1,15 @@ +#pragma locale ("en_US") +#pragma include ("qualifiers.mof") +#pragma include ("qualifiers_optional.mof") +#pragma include ("Core/CIM_ManagedElement.mof") +#pragma include ("Core/CIM_ManagedSystemElement.mof") +#pragma include ("Core/CIM_LogicalElement.mof") +#pragma include ("Core/CIM_EnabledLogicalElement.mof") +#pragma include ("Core/CIM_System.mof") +#pragma include ("System/CIM_ComputerSystem.mof") +#pragma include ("Interop/CIM_RegisteredProfile.mof") +#pragma include ("Interop/CIM_RegisteredSubProfile.mof") +#pragma include ("Core/CIM_Dependency.mof") +#pragma include ("Interop/CIM_ElementConformsToProfile.mof") +#pragma include ("Interop/CIM_ReferencedProfile.mof") +#pragma include ("Interop/CIM_SubProfileRequiresProfile.mof") diff -r 0f3d28e6d2ed -r 588daf25941e base_schema/fix_schema.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/fix_schema.patch Fri Dec 07 14:26:56 2007 -0800 @@ -0,0 +1,22 @@ +--- cimv216.mof 2007-08-30 16:19:12.000000000 -0700 ++++ cimv216-new.mof 2007-12-05 12:45:56.000000000 -0800 +@@ -505,7 +505,7 @@ + #pragma include ("Policy/CIM_PolicySetValidityPeriod.mof") + #pragma include ("Policy/CIM_PublicPrivateKeyAuthentication.mof") + #pragma include ("Policy/CIM_SharedSecretAuthentication.mof") +-#pragma include ("Security/CIM_SecurityIndication.mof") ++//#pragma include ("Security/CIM_SecurityIndication.mof") + #pragma include ("Support/PRS_Activity.mof") + #pragma include ("Support/PRS_ActivityResource.mof") + #pragma include ("Support/PRS_ActivityTransaction.mof") +@@ -726,8 +726,8 @@ + #pragma include ("Policy/CIM_PolicyActionStructure.mof") + #pragma include ("Policy/CIM_PolicyConditionInPolicyCondition.mof") + #pragma include ("Policy/CIM_PolicyConditionInPolicyRule.mof") +-#pragma include ("Security/CIM_IPNetworkSecurityIndication.mof") +-#pragma include ("Security/CIM_IPPacketFilterIndication.mof") ++//#pragma include ("Security/CIM_IPNetworkSecurityIndication.mof") ++//#pragma include ("Security/CIM_IPPacketFilterIndication.mof") + #pragma include ("Support/PRS_ActivityContact.mof") + #pragma include ("Support/PRS_AdminAssociation.mof") + #pragma include ("Support/PRS_AdministrativeContact.mof") From danms at us.ibm.com Fri Dec 7 21:37:38 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 14:37:38 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] #2 Add automated base schema installation Message-ID: Changes since last time are almost exclusively to the installation script From danms at us.ibm.com Fri Dec 7 21:37:41 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Dec 2007 14:37:41 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Build support for base schema installation In-Reply-To: Message-ID: <6fae41fcbfbdcdc9c8b2.1197067061@theine> # HG changeset patch # User Dan Smith # Date 1197066994 28800 # Node ID 6fae41fcbfbdcdc9c8b205c93df6daf6c4d558a9 # Parent 0d80882209b4002da9283e4cfe17d48cb1155d45 Build support for base schema installation Signed-off-by: Dan Smith diff -r 0d80882209b4 -r 6fae41fcbfbd Makefile.am --- a/Makefile.am Fri Dec 07 14:36:30 2007 -0800 +++ b/Makefile.am Fri Dec 07 14:36:34 2007 -0800 @@ -1,5 +1,5 @@ # Copyright IBM Corp. 2007 -SUBDIRS = libxkutil src doc +SUBDIRS = libxkutil src doc base_schema MOFS = \ schema/ComputerSystem.mof \ @@ -89,6 +89,9 @@ EXTRA_DIST = schema $(pkgdata_DATA) $(pk libvirt-cim.spec.in libvirt-cim.spec \ doc/CodingStyle doc/SubmittingPatches +preinstall: + sh -x base_schema/install_base_schema.sh `pwd`/base_schema + # Un/Register the providers and class definitions from/to the current CIMOM. # @CIMSERVER@ is set by the configure script postinstall: diff -r 0d80882209b4 -r 6fae41fcbfbd base_schema/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/Makefile.am Fri Dec 07 14:36:34 2007 -0800 @@ -0,0 +1,9 @@ +CIM_SCHEMA_VER = 216 +CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experimental +CIM_SCHEMA_ZIP = cimv$(CIM_SCHEMA_REL)-MOFs.zip + +dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof +dist_pkgdata_SCRIPTS = install_base_schema.sh + +$(CIM_SCHEMA_ZIP): + wget http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCHEMA_ZIP) \ No newline at end of file diff -r 0d80882209b4 -r 6fae41fcbfbd configure.ac --- a/configure.ac Fri Dec 07 14:36:30 2007 -0800 +++ b/configure.ac Fri Dec 07 14:36:34 2007 -0800 @@ -87,6 +87,8 @@ AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bi # Autogenerate the Makefile AC_CONFIG_FILES([ + base_schema/install_base_schema.sh + base_schema/Makefile libxkutil/Makefile libxkutil/tests/Makefile src/Makefile diff -r 0d80882209b4 -r 6fae41fcbfbd libvirt-cim.spec.in --- a/libvirt-cim.spec.in Fri Dec 07 14:36:30 2007 -0800 +++ b/libvirt-cim.spec.in Fri Dec 07 14:36:34 2007 -0800 @@ -55,6 +55,8 @@ rm -fr $RPM_BUILD_ROOT %post /sbin/ldconfig +%{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} + %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n /@CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} || true @@ -76,7 +78,10 @@ rm -fr $RPM_BUILD_ROOT %{_libdir}/cmpi/lib*.so* %{_datadir}/libvirt-cim/*.sh %{_datadir}/libvirt-cim/*.mof +%{_datadir}/libvirt-cim/cimv*-interop_mof %{_datadir}/libvirt-cim/*.registration +%{_datadir}/libvirt-cim/fix_schema.patch +%{_datadir}/libvirt-cim/cimv*-MOFs.zip %changelog * Fri Oct 26 2007 Daniel Veillard - 0.1-1 From kaitlin at linux.vnet.ibm.com Sat Dec 8 01:24:27 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 07 Dec 2007 17:24:27 -0800 Subject: [Libvirt-cim] [PATCH] Fix missing migration header for distribution In-Reply-To: <9645be7b079b882978e9.1196962096@theine> References: <9645be7b079b882978e9.1196962096@theine> Message-ID: <4759F24B.2070704@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1196959081 28800 > # Node ID 9645be7b079b882978e9ef636c128fef95967497 > # Parent d9af4651f76314647dbda82f5ccf3d926ce9dc05 > Fix missing migration header for distribution > Good catch. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Sat Dec 8 01:30:54 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 07 Dec 2007 17:30:54 -0800 Subject: [Libvirt-cim] [PATCH] Fix missing InstanceID in ResourcePoolConfigurationCapabilities In-Reply-To: <25193cc30daf4db213e9.1196965123@theine> References: <25193cc30daf4db213e9.1196965123@theine> Message-ID: <4759F3CE.6040006@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1196965106 28800 > # Node ID 25193cc30daf4db213e989ee04573b7765785405 > # Parent ebc42d00406a9800662470bb47fe5196e34c99a3 > Fix missing InstanceID in ResourcePoolConfigurationCapabilities > Excellent - worked for me. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From heidieck at linux.vnet.ibm.com Mon Dec 10 07:34:05 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 10 Dec 2007 09:34:05 +0200 Subject: [Libvirt-cim] [PATCH] [CU] Fix tools/Makefile to take care of removed itest.c Message-ID: <232cec89a48eab8ef8e5.1197275645@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197275636 -3600 # Node ID 232cec89a48eab8ef8e597a7e90334cb6c50987c # Parent d09a2f8d14bf7fb9e78480353cb18c54545b9d1d [CU] Fix tools/Makefile to take care of removed itest.c The itest.c file was removed by the previous fix, but not taken out of tools/Makefile. Signed-off-by: Heidi Eckhart diff -r d09a2f8d14bf -r 232cec89a48e tools/Makefile.am --- a/tools/Makefile.am Thu Dec 06 11:36:42 2007 -0500 +++ b/tools/Makefile.am Mon Dec 10 09:33:56 2007 +0100 @@ -1,4 +1,1 @@ # Copyright IBM Corp. 2007 -noinst_PROGRAMS = itest - -itest_SOURCES = itest.c \ No newline at end of file From heidieck at linux.vnet.ibm.com Mon Dec 10 09:22:46 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 10 Dec 2007 10:22:46 +0100 Subject: [Libvirt-cim] [PATCH 0 of 2] Added match_hypervisor_prefix() to association's handler functions to avoid wrong results In-Reply-To: <4756B9CB.4050307@linux.vnet.ibm.com> References: <4756B9CB.4050307@linux.vnet.ibm.com> Message-ID: <475D0566.1080101@linux.vnet.ibm.com> Jay Gagnon wrote: > P.S. We've tested match_hypervisor_prefix with both sfcb and pegasus, > right? I'd love to know we finally have this duplicates issue resolved > for both CIMOMs. > Yes, tested and works with both - Pegasus and sfcb. Next CIMOM to test is openWbem. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 10 09:52:39 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 10 Dec 2007 10:52:39 +0100 Subject: [Libvirt-cim] [PATCH] html: Added additional classes to cimv216-interop.mof In-Reply-To: <47582E3E.2060800@linux.vnet.ibm.com> References: <30269254841ceed6a250.1196935636@localhost.localdomain> <475829E1.7070501@linux.vnet.ibm.com> <47582E3E.2060800@linux.vnet.ibm.com> Message-ID: <475D0C67.8020808@linux.vnet.ibm.com> Kaitlin Rupert wrote: > For my own curiosity - I'm not sure why CIM_EnabledLogicalElement.mof > and CIM_Dependency.mof need to be added. The derivation hierarchy for ComputerSystem is ManagedElement -> ManagedSystemElement -> LogicalElement -> EnabledLogicalElement -> System -> ComputerSystem Dependency is not really necessary at the moment, but as ReferencedProfile derives from it and we will implement this association sooner or later, I already added this one to the list. But you are right. At the moment its not a requirement. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 10 13:06:21 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 10 Dec 2007 14:06:21 +0100 Subject: [Libvirt-cim] [PATCH 2 of 3] Add base schema installation script In-Reply-To: <0d80882209b4002da928.1197067060@theine> References: <0d80882209b4002da928.1197067060@theine> Message-ID: <475D39CD.9060508@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1197066990 28800 > # Node ID 0d80882209b4002da9283e4cfe17d48cb1155d45 > # Parent 588daf25941e36b540689209bf0c76b1ce08cb32 > Add base schema installation script > Great work :). I tested the processes with sfcbd and found some minor things. After updating them, everything worked fine :). Thanks. Somehow the "if [ ! mkdir ${dir}/CIM ]; then" in install_schema_sfcb() seem to do not work. I completely removed the CIM directory by hand, did "make preinstall" but no new one was created. The script does now creating the directory and testing for existence afterwards and this seems to work. I have only some experiences with scripts and don't know the reason for this behavior. The schema files need to be copied to SFCB_DIR/CIM and sfcbrepos must be started with -f to avoid the question to the user for acceptance. Added a line to remove the schema files from /tmp. diff -r ae7fb433a73a base_schema/install_base_schema.sh.in --- a/base_schema/install_base_schema.sh.in Fri Dec 07 14:36:34 2007 -0800 +++ b/base_schema/install_base_schema.sh.in Mon Dec 10 14:00:37 2007 +0100 @@ -64,15 +64,18 @@ install_schema_sfcb() { install_schema_sfcb() { local dir=$(detect_sfcb_dir) - if [ ! mkdir ${dir}/CIM ]; then + mkdir ${dir}/CIM + if [ -z ${dir}/CIM ]; then echo "Unable to determine SFCB directory" echo "set SFCB_DIR" return fi mv ${TMPDIR}/cimv???.mof ${TMPDIR}/CIM_Schema.mof - cp -ra ${TMPDIR}/* ${dir} - sfcbrepos + cp -ra ${TMPDIR}/* ${dir}/CIM + sfcbrepos -f + + rm -rf ${TMPDIR} } if [ -z "$1" ]; then -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 10 13:14:17 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 10 Dec 2007 14:14:17 +0100 Subject: [Libvirt-cim] [PATCH] html: Added additional classes to cimv216-interop.mof In-Reply-To: <475829E1.7070501@linux.vnet.ibm.com> References: <30269254841ceed6a250.1196935636@localhost.localdomain> <475829E1.7070501@linux.vnet.ibm.com> Message-ID: <475D3BA9.5040609@linux.vnet.ibm.com> Jay Gagnon wrote: > Heidi Eckhart wrote: > >> # HG changeset patch >> # User Heidi Eckhart >> # Date 1196935599 -3600 >> # Node ID 30269254841ceed6a250ea2b714c594fa30cc19e >> # Parent ba4bc35f508573c53e4303ce2e7a9b5299b95f38 >> html: Added additional classes to cimv216-interop.mof >> >> These additional classes are necessary to register Xen/KVM >> ComputerSystem and HostSystem classes to interop. Otherwise >> Pegasus refuses the registration. >> Signed-off-by: Heidi Eckhart >> >> diff -r ba4bc35f5085 -r 30269254841c doc/libvirt-cim.html >> --- a/doc/libvirt-cim.html Thu Dec 06 11:06:38 2007 +0100 >> +++ b/doc/libvirt-cim.html Thu Dec 06 11:06:39 2007 +0100 >> @@ -300,6 +300,11 @@ below:

>> #pragma include ("qualifiers.mof")
>> #pragma include ("qualifiers_optional.mof")
>> #pragma include ("Core/CIM_ManagedElement.mof")
>> +#pragma include ("Core/CIM_ManagedSystemElement.mof")
>> +#pragma include ("Core/CIM_LogicalElement.mof")
>> +#pragma include ("Core/CIM_EnabledLogicalElement.mof")
>> +#pragma include ("Core/CIM_System.mof")
>> +#pragma include ("System/CIM_ComputerSystem.mof")
>> #pragma include ("Interop/CIM_RegisteredProfile.mof")
>> #pragma include ("Interop/CIM_RegisteredSubProfile.mof")
>> #pragma include ("Core/CIM_Dependency.mof")
>> >> > > Looks syntactically sound. I don't recognize a couple of those classes > as dual-namespace ones, but I'm not going to second guess our CIM > Compliance Officer on that. :) +1 The registration of the classes where a RegisteredProfile is ElementConformsToProfile associated to is necessary for our checking mechanism in std_association. Otherwise CMClassPathIsA() fails, as the class is not found for the /root/interop namespace. The additional registration is only necessary for Pegasus. sfcb shares the one base schema all over its namespaces. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From danms at us.ibm.com Mon Dec 10 15:58:52 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 07:58:52 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Add base schema installation script In-Reply-To: <475D39CD.9060508@linux.vnet.ibm.com> (Heidi Eckhart's message of "Mon, 10 Dec 2007 14:06:21 +0100") References: <0d80882209b4002da928.1197067060@theine> <475D39CD.9060508@linux.vnet.ibm.com> Message-ID: <87y7c2k0cj.fsf@theine.beaverton.ibm.com> HE> - if [ ! mkdir ${dir}/CIM ]; then HE> + mkdir ${dir}/CIM HE> + if [ -z ${dir}/CIM ]; then Ah, yes, this will fail if the CIM directory already exists. HE> - cp -ra ${TMPDIR}/* ${dir} HE> - sfcbrepos HE> + cp -ra ${TMPDIR}/* ${dir}/CIM HE> + sfcbrepos -f Oh yeah, both are good changes. I'll re-send the set with these changes applied. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Mon Dec 10 15:00:06 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:00:06 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Add base schema installation script In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1197302293 28800 # Node ID ac886eb23431ddd5505cb610704606d741fbd399 # Parent 8267fcc7dbcc82f36700b95d9a32283c81864c93 Add base schema installation script Changes: - Fixed sfcb installation directory creation and population - Removed explicit -x - Added optional -x and debug dump based on environment variable - Fixed cimv*.mof ambiguity Signed-off-by: Dan Smith diff -r 8267fcc7dbcc -r ac886eb23431 base_schema/install_base_schema.sh.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/install_base_schema.sh.in Mon Dec 10 07:58:13 2007 -0800 @@ -0,0 +1,103 @@ +#!/bin/bash + +DATA="$1" +NS=@CIM_VIRT_NS@ +CIMOM=@CIMSERVER@ + +TMPDIR=$(mktemp -d /tmp/cim_schema.XXXXX) + +if [ ! -z "$CIM_DEBUG" ]; then + set -x + DEBUG="$TMPDIR/log" +else + DEBUG="/dev/null" +fi + +unpack_schema() { + cd ${TMPDIR} && unzip ${DATA}/cimv*-MOFs.zip +} + +fix_schema() { + (cd ${TMPDIR} && patch -p0 < ${DATA}/fix_schema.patch) + cp -a ${DATA}/cimv216-interop_mof ${TMPDIR}/cimv216-interop.mof +} + +detect_peg_repo() { + dirs="$PEGASUS_HOME /var/lib/Pegasus /var/lib/pegasus /usr/local/var/lib/pegasus /var/local/lib/pegasus /var/opt/tog-pegasus" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d + return + fi + done +} + +detect_sfcb_dir() { + dirs="SFCB_DIR /usr/local/share/sfcb /usr/share/sfcb" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d; + return + fi + done +} + +install_schema_pegasus() { + local repo=$(detect_peg_repo) + + if [ -z "$repo" ]; then + echo "Unable to determine Pegasus repository path" + echo "set PEGASUS_HOME" + return + fi + + cd ${TMPDIR} + + cimmofl -uc -aEV -R$repo -n $NS cimv???.mof + cimmofl -uc -aEV -R$repo -n $NS qualifiers.mof + cimmofl -uc -aEV -R$repo -n $NS qualifiers_optional.mof + cimmofl -uc -aEV -R$repo -n /root/interop cimv???-interop.mof +} + +install_schema_sfcb() { + local dir=$(detect_sfcb_dir) + + mkdir ${dir}/CIM + if [ -d "${dir}/CIM" ]; then + echo "Unable to determine SFCB directory" + echo "set SFCB_DIR" + return + fi + + mv ${TMPDIR}/cimv???.mof ${TMPDIR}/CIM_Schema.mof + cp -ra ${TMPDIR}/* ${dir}/CIM + sfcbrepos -f +} + +if [ -z "$1" ]; then + echo "Usage: $0 [source_dir]" + exit 1 +fi + +(unpack_schema) >>$DEBUG 2>&1 +(fix_schema) >>$DEBUG 2>&1 + +case "$CIMOM" in + sfcb) + (install_schema_sfcb) >>$DEBUG 2>&1 + ;; + pegasus) + (install_schema_pegasus) >>$DEBUG 2>&1 + ;; + *) + echo ERROR: Unknown CIMOM: $CIMOM + ;; +esac + +if [ -f "$DEBUG" ]; then + echo "-- base schema install log begin --" + cat $DEBUG + echo "-- base schema install log end --" +fi \ No newline at end of file From danms at us.ibm.com Mon Dec 10 15:00:04 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:00:04 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] #3 Add automated base schema Message-ID: Changes since last time are just those described by Heidi From danms at us.ibm.com Mon Dec 10 15:00:05 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:00:05 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Add base schema support files for automated installation In-Reply-To: Message-ID: <8267fcc7dbcc82f36700.1197302405@theine> # HG changeset patch # User Dan Smith # Date 1197302016 28800 # Node ID 8267fcc7dbcc82f36700b95d9a32283c81864c93 # Parent 592ab8eeeaa744ba234c7c178be01c05639d767a Add base schema support files for automated installation Signed-off-by: Dan Smith diff -r 592ab8eeeaa7 -r 8267fcc7dbcc base_schema/cimv216-interop_mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/cimv216-interop_mof Mon Dec 10 07:53:36 2007 -0800 @@ -0,0 +1,15 @@ +#pragma locale ("en_US") +#pragma include ("qualifiers.mof") +#pragma include ("qualifiers_optional.mof") +#pragma include ("Core/CIM_ManagedElement.mof") +#pragma include ("Core/CIM_ManagedSystemElement.mof") +#pragma include ("Core/CIM_LogicalElement.mof") +#pragma include ("Core/CIM_EnabledLogicalElement.mof") +#pragma include ("Core/CIM_System.mof") +#pragma include ("System/CIM_ComputerSystem.mof") +#pragma include ("Interop/CIM_RegisteredProfile.mof") +#pragma include ("Interop/CIM_RegisteredSubProfile.mof") +#pragma include ("Core/CIM_Dependency.mof") +#pragma include ("Interop/CIM_ElementConformsToProfile.mof") +#pragma include ("Interop/CIM_ReferencedProfile.mof") +#pragma include ("Interop/CIM_SubProfileRequiresProfile.mof") diff -r 592ab8eeeaa7 -r 8267fcc7dbcc base_schema/fix_schema.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/fix_schema.patch Mon Dec 10 07:53:36 2007 -0800 @@ -0,0 +1,22 @@ +--- cimv216.mof 2007-08-30 16:19:12.000000000 -0700 ++++ cimv216-new.mof 2007-12-05 12:45:56.000000000 -0800 +@@ -505,7 +505,7 @@ + #pragma include ("Policy/CIM_PolicySetValidityPeriod.mof") + #pragma include ("Policy/CIM_PublicPrivateKeyAuthentication.mof") + #pragma include ("Policy/CIM_SharedSecretAuthentication.mof") +-#pragma include ("Security/CIM_SecurityIndication.mof") ++//#pragma include ("Security/CIM_SecurityIndication.mof") + #pragma include ("Support/PRS_Activity.mof") + #pragma include ("Support/PRS_ActivityResource.mof") + #pragma include ("Support/PRS_ActivityTransaction.mof") +@@ -726,8 +726,8 @@ + #pragma include ("Policy/CIM_PolicyActionStructure.mof") + #pragma include ("Policy/CIM_PolicyConditionInPolicyCondition.mof") + #pragma include ("Policy/CIM_PolicyConditionInPolicyRule.mof") +-#pragma include ("Security/CIM_IPNetworkSecurityIndication.mof") +-#pragma include ("Security/CIM_IPPacketFilterIndication.mof") ++//#pragma include ("Security/CIM_IPNetworkSecurityIndication.mof") ++//#pragma include ("Security/CIM_IPPacketFilterIndication.mof") + #pragma include ("Support/PRS_ActivityContact.mof") + #pragma include ("Support/PRS_AdminAssociation.mof") + #pragma include ("Support/PRS_AdministrativeContact.mof") From danms at us.ibm.com Mon Dec 10 15:00:07 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:00:07 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Build support for base schema installation In-Reply-To: Message-ID: <6526275a35d9ebffc8bf.1197302407@theine> # HG changeset patch # User Dan Smith # Date 1197302381 28800 # Node ID 6526275a35d9ebffc8bf2ad7295a843482d25293 # Parent ac886eb23431ddd5505cb610704606d741fbd399 Build support for base schema installation Signed-off-by: Dan Smith diff -r ac886eb23431 -r 6526275a35d9 Makefile.am --- a/Makefile.am Mon Dec 10 07:58:13 2007 -0800 +++ b/Makefile.am Mon Dec 10 07:59:41 2007 -0800 @@ -1,5 +1,5 @@ # Copyright IBM Corp. 2007 -SUBDIRS = libxkutil src doc +SUBDIRS = libxkutil src doc base_schema MOFS = \ schema/ComputerSystem.mof \ @@ -89,6 +89,9 @@ EXTRA_DIST = schema $(pkgdata_DATA) $(pk libvirt-cim.spec.in libvirt-cim.spec \ doc/CodingStyle doc/SubmittingPatches +preinstall: + sh -x base_schema/install_base_schema.sh `pwd`/base_schema + # Un/Register the providers and class definitions from/to the current CIMOM. # @CIMSERVER@ is set by the configure script postinstall: diff -r ac886eb23431 -r 6526275a35d9 base_schema/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/Makefile.am Mon Dec 10 07:59:41 2007 -0800 @@ -0,0 +1,9 @@ +CIM_SCHEMA_VER = 216 +CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experimental +CIM_SCHEMA_ZIP = cimv$(CIM_SCHEMA_REL)-MOFs.zip + +dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof +dist_pkgdata_SCRIPTS = install_base_schema.sh + +$(CIM_SCHEMA_ZIP): + wget http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCHEMA_ZIP) \ No newline at end of file diff -r ac886eb23431 -r 6526275a35d9 configure.ac --- a/configure.ac Mon Dec 10 07:58:13 2007 -0800 +++ b/configure.ac Mon Dec 10 07:59:41 2007 -0800 @@ -87,6 +87,8 @@ AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bi # Autogenerate the Makefile AC_CONFIG_FILES([ + base_schema/install_base_schema.sh + base_schema/Makefile libxkutil/Makefile libxkutil/tests/Makefile src/Makefile diff -r ac886eb23431 -r 6526275a35d9 libvirt-cim.spec.in --- a/libvirt-cim.spec.in Mon Dec 10 07:58:13 2007 -0800 +++ b/libvirt-cim.spec.in Mon Dec 10 07:59:41 2007 -0800 @@ -55,6 +55,8 @@ rm -fr $RPM_BUILD_ROOT %post /sbin/ldconfig +%{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} + %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n /@CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} || true @@ -76,7 +78,10 @@ rm -fr $RPM_BUILD_ROOT %{_libdir}/cmpi/lib*.so* %{_datadir}/libvirt-cim/*.sh %{_datadir}/libvirt-cim/*.mof +%{_datadir}/libvirt-cim/cimv*-interop_mof %{_datadir}/libvirt-cim/*.registration +%{_datadir}/libvirt-cim/fix_schema.patch +%{_datadir}/libvirt-cim/cimv*-MOFs.zip %changelog * Fri Oct 26 2007 Daniel Veillard - 0.1-1 From grendel at linux.vnet.ibm.com Mon Dec 10 16:20:46 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 10 Dec 2007 11:20:46 -0500 Subject: [Libvirt-cim] [PATCH 0 of 5] Build and configure cleanups In-Reply-To: References: Message-ID: <475D675E.1040509@linux.vnet.ibm.com> Dan Smith wrote: > This patch set started out as just a change to check for a new-enough > version of libvirt on the installed system. It evolved into cleaning up > a bunch of the package checks in aclocal.m4, a couple of configure > cleanups, and a bunch of changes #include statements to account for > changes in how we include package directories (which is correct, as of > this set, IMHO). > > Comments and testing on a variety of platforms would be appreciated. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > Seriously good stuff. As usual, the build/configure stuff isn't really my area of expertise, but taking out a whole pile of m4 macros is always a good thing, and offloading the responsibility to pkg-config seems like a terrific idea. The include cleanups looked good too. +1 -- -Jay From grendel at linux.vnet.ibm.com Mon Dec 10 16:23:34 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 10 Dec 2007 11:23:34 -0500 Subject: [Libvirt-cim] [PATCH] [CU] Fix tools/Makefile to take care of removed itest.c In-Reply-To: <232cec89a48eab8ef8e5.1197275645@localhost.localdomain> References: <232cec89a48eab8ef8e5.1197275645@localhost.localdomain> Message-ID: <475D6806.6070709@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1197275636 -3600 > # Node ID 232cec89a48eab8ef8e597a7e90334cb6c50987c > # Parent d09a2f8d14bf7fb9e78480353cb18c54545b9d1d > [CU] Fix tools/Makefile to take care of removed itest.c > > The itest.c file was removed by the previous fix, but > not taken out of tools/Makefile. > Signed-off-by: Heidi Eckhart > > Oops, totally forgot about that. Thanks for catching it! +1 (This of course should go in at the same time as my patches) -- -Jay From danms at us.ibm.com Mon Dec 10 15:54:10 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:54:10 -0700 Subject: [Libvirt-cim] [PATCH 5 of 5] Fixes to header includes for configure changes In-Reply-To: Message-ID: <70e9f11ed6d3ea63b342.1197305650@theine> # HG changeset patch # User Dan Smith # Date 1197305648 28800 # Node ID 70e9f11ed6d3ea63b342c4c3de68cc948d7c1cfd # Parent 999e44674d82ed1351303ac73740cb61aa77bedf Fixes to header includes for configure changes Signed-off-by: Dan Smith diff -r 999e44674d82 -r 70e9f11ed6d3 libxkutil/cs_util_instance.c --- a/libxkutil/cs_util_instance.c Mon Dec 10 08:54:06 2007 -0800 +++ b/libxkutil/cs_util_instance.c Mon Dec 10 08:54:08 2007 -0800 @@ -31,7 +31,7 @@ #include #include "cs_util.h" -#include "libcmpiutil.h" +#include int get_domain_list(virConnectPtr conn, virDomainPtr **_list) { diff -r 999e44674d82 -r 70e9f11ed6d3 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Mon Dec 10 08:54:06 2007 -0800 +++ b/libxkutil/device_parsing.c Mon Dec 10 08:54:08 2007 -0800 @@ -28,7 +28,7 @@ #include #include -#include +#include #include "device_parsing.h" #include "xmlgen.h" diff -r 999e44674d82 -r 70e9f11ed6d3 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Mon Dec 10 08:54:06 2007 -0800 +++ b/libxkutil/misc_util.c Mon Dec 10 08:54:08 2007 -0800 @@ -32,8 +32,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "cs_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 libxkutil/misc_util.h --- a/libxkutil/misc_util.h Mon Dec 10 08:54:06 2007 -0800 +++ b/libxkutil/misc_util.h Mon Dec 10 08:54:08 2007 -0800 @@ -31,8 +31,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include -#include +#include +#include /* Check if the provider is reponsible for the given class: * e.g. Xen is running on the system and KVM_... is asked for, diff -r 999e44674d82 -r 70e9f11ed6d3 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Mon Dec 10 08:54:06 2007 -0800 +++ b/libxkutil/xmlgen.c Mon Dec 10 08:54:08 2007 -0800 @@ -29,7 +29,7 @@ #ifndef TEST #include "misc_util.h" -#include "libcmpiutil.h" +#include #include "cmpimacs.h" #endif diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_AllocationCapabilities.c Mon Dec 10 08:54:08 2007 -0800 @@ -25,8 +25,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ComputerSystem.c Mon Dec 10 08:54:08 2007 -0800 @@ -28,13 +28,13 @@ #include #include -#include +#include #include "cs_util.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_invokemethod.h" -#include "std_instance.h" +#include +#include #include "Virt_ComputerSystem.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ComputerSystemIndication.c Mon Dec 10 08:54:08 2007 -0800 @@ -32,9 +32,9 @@ #include -#include +#include #include -#include +#include #include #include "config.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_Device.c --- a/src/Virt_Device.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_Device.c Mon Dec 10 08:54:08 2007 -0800 @@ -29,8 +29,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "cs_util.h" #include "misc_util.h" #include "device_parsing.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_DevicePool.c Mon Dec 10 08:54:08 2007 -0800 @@ -38,8 +38,8 @@ #include "hostres.h" #include "device_parsing.h" -#include -#include +#include +#include #include "Virt_DevicePool.h" #include "svpc_types.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_DevicePool.h --- a/src/Virt_DevicePool.h Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_DevicePool.h Mon Dec 10 08:54:08 2007 -0800 @@ -22,8 +22,8 @@ #define __VIRT_DEVICE_POOL_H #include -#include -#include +#include +#include #include extern char *device_pool_names[]; diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Mon Dec 10 08:54:08 2007 -0800 @@ -27,8 +27,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "cs_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ElementCapabilities.c Mon Dec 10 08:54:08 2007 -0800 @@ -28,9 +28,9 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_association.h" +#include #include "Virt_VirtualSystemManagementCapabilities.h" #include "Virt_EnabledLogicalElementCapabilities.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ElementConformsToProfile.c Mon Dec 10 08:54:08 2007 -0800 @@ -29,10 +29,10 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" #include "profiles.h" -#include "std_association.h" +#include #include "config.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ElementSettingData.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "Virt_VSSD.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" #include "cs_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_HostSystem.c Mon Dec 10 08:54:08 2007 -0800 @@ -27,8 +27,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_HostedDependency.c Mon Dec 10 08:54:08 2007 -0800 @@ -27,8 +27,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "Virt_ComputerSystem.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_HostedResourcePool.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,11 +26,11 @@ #include #include -#include +#include -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_association.h" +#include #include "Virt_HostSystem.h" #include "Virt_DevicePool.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_HostedService.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "Virt_HostSystem.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_RASD.c --- a/src/Virt_RASD.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_RASD.c Mon Dec 10 08:54:08 2007 -0800 @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include "device_parsing.h" #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_RegisteredProfile.c --- a/src/Virt_RegisteredProfile.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_RegisteredProfile.c Mon Dec 10 08:54:08 2007 -0800 @@ -29,8 +29,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "cs_util.h" #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ResourceAllocationFromPool.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,8 +26,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "cs_util.h" #include "device_parsing.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ResourcePoolConfigurationCapabilities.c --- a/src/Virt_ResourcePoolConfigurationCapabilities.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_ResourcePoolConfigurationService.c Mon Dec 10 08:54:08 2007 -0800 @@ -22,9 +22,9 @@ #include "cmpift.h" #include "cmpimacs.h" -#include -#include -#include +#include +#include +#include #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,7 +26,7 @@ #include #include -#include +#include #include "config.h" @@ -34,9 +34,9 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_association.h" +#include #include "device_parsing.h" #include "svpc_types.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_SettingsDefineState.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,8 +26,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "device_parsing.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_SystemDevice.c Mon Dec 10 08:54:08 2007 -0800 @@ -29,11 +29,11 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" +#include #include "device_parsing.h" #include "misc_util.h" #include "cs_util.h" -#include "std_association.h" +#include #include "Virt_ComputerSystem.h" #include "Virt_Device.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_VSMigrationCapabilities.c --- a/src/Virt_VSMigrationCapabilities.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_VSMigrationCapabilities.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,9 +26,9 @@ #include #include -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_instance.h" +#include #include "Virt_VSMigrationCapabilities.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_VSMigrationService.c Mon Dec 10 08:54:08 2007 -0800 @@ -22,16 +22,16 @@ #include #include -#include +#include #include #include #include -#include "libcmpiutil.h" +#include #include "misc_util.h" -#include "std_instance.h" -#include "std_invokemethod.h" +#include +#include #include "Virt_VSMigrationService.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_VSSD.c Mon Dec 10 08:54:08 2007 -0800 @@ -27,8 +27,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "cs_util.h" #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_VSSDComponent.c Mon Dec 10 08:54:08 2007 -0800 @@ -25,8 +25,8 @@ #include "cmpift.h" #include "cmpimacs.h" -#include "libcmpiutil.h" -#include "std_association.h" +#include +#include #include "misc_util.h" #include "device_parsing.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_VirtualSystemManagementCapabilities.c --- a/src/Virt_VirtualSystemManagementCapabilities.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_VirtualSystemManagementCapabilities.c Mon Dec 10 08:54:08 2007 -0800 @@ -26,8 +26,8 @@ #include #include -#include "libcmpiutil.h" -#include "std_instance.h" +#include +#include #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon Dec 10 08:54:06 2007 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Mon Dec 10 08:54:08 2007 -0800 @@ -35,10 +35,10 @@ #include "device_parsing.h" #include "xmlgen.h" -#include "libcmpiutil.h" -#include "std_invokemethod.h" -#include "std_indication.h" -#include "std_instance.h" +#include +#include +#include +#include #include "misc_util.h" diff -r 999e44674d82 -r 70e9f11ed6d3 src/svpc_types.h --- a/src/svpc_types.h Mon Dec 10 08:54:06 2007 -0800 +++ b/src/svpc_types.h Mon Dec 10 08:54:08 2007 -0800 @@ -32,7 +32,7 @@ /* Vendor-specific extension; should be documented somewhere */ #define CIM_VSSD_RECOVERY_PRESERVE 123 -#include +#include #include static inline char *vssd_recovery_action_str(int action) From danms at us.ibm.com Mon Dec 10 15:54:07 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:54:07 -0700 Subject: [Libvirt-cim] [PATCH 2 of 5] Change libcmpiutil check in configure to use pkg-config In-Reply-To: Message-ID: <65a5013ebb72858c0423.1197305647@theine> # HG changeset patch # User Dan Smith # Date 1197304307 28800 # Node ID 65a5013ebb72858c04230962f352ecbe75a246ad # Parent 27dd39ce2e0d3c9b73edce39498acd7ac723b917 Change libcmpiutil check in configure to use pkg-config Signed-off-by: Dan Smith diff -r 27dd39ce2e0d -r 65a5013ebb72 acinclude.m4 --- a/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800 +++ b/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800 @@ -259,43 +259,12 @@ AC_DEFUN([CHECK_LIBXML2], ] ) -AC_DEFUN([_CHECK_LIBCU_PC], - [ - if pkg-config --exists libcmpiutil; then - CPPFLAGS="$CPPFLAGS `pkg-config --cflags libcmpiutil`" - LDFLAGS="$LDFLAGS `pkg-config --libs libcmpiutil`" - found_libcu=yes - fi - ] -) - -AC_DEFUN([_CHECK_LIBCU_NOPC], - [ - DIRS="/usr /usr/local" - for dir in $DIRS; do - if test -f "${dir}/include/libcmpiutil/libcmpiutil.h"; then - CPPFLAGS="$CPPFLAGS -I${dir}/include/libcmpiutil" - LDFLAGS="$LDFLAGS -lcmpiutil -L${dir}/lib" - found_libcu=yes - fi - done - ] -) - AC_DEFUN([CHECK_LIBCU], [ - _CHECK_LIBCU_PC - if test "x$found_libcu" != "xyes"; then - _CHECK_LIBCU_NOPC - fi - AC_CHECK_LIB(cmpiutil, cu_check_args, [], [ - AC_MSG_ERROR(libcmpiutil not found) - ]) - AC_CHECK_HEADER([libcmpiutil.h], [], [ - AC_MSG_ERROR([libcmpiutil.h not found]) - ]) - ] -) + PKG_CHECK_MODULES([LIBCU], [libcmpiutil >= 0.1]) + CPPFLAGS="$CPPFLAGS $LIBCU_CFLAGS" + LDFLAGS="$LDFLAGS $LIBCU_LIBS" + ]) AC_DEFUN([CHECK_LIBVIRT], [ From danms at us.ibm.com Mon Dec 10 15:54:08 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:54:08 -0700 Subject: [Libvirt-cim] [PATCH 3 of 5] Make libxml2 check use pkg-config as well In-Reply-To: Message-ID: <0c5b0d0f26f501f56393.1197305648@theine> # HG changeset patch # User Dan Smith # Date 1197304307 28800 # Node ID 0c5b0d0f26f501f56393fe0455e28ee2a1730629 # Parent 65a5013ebb72858c04230962f352ecbe75a246ad Make libxml2 check use pkg-config as well Signed-off-by: Dan Smith diff -r 65a5013ebb72 -r 0c5b0d0f26f5 acinclude.m4 --- a/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800 +++ b/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800 @@ -221,43 +221,12 @@ AC_DEFUN([CHECK_CIMSERVER], ] ) -dnl -dnl The check for the libxml2 library -dnl Sets the LIBXML2DIR variable -dnl - -AC_DEFUN([_CHECK_LIBXML2], -[ - AC_MSG_CHECKING($1) - AC_TRY_LINK( - [ - #include - ], - [ - xmlNodePtr nodeptr; - ], - [ - have_LIBXML2=yes - dnl AC_MSG_RESULT(yes) - ], - [ - have_LIBXML2=no - dnl AC_MSG_RESULT(no) - ]) -]) - AC_DEFUN([CHECK_LIBXML2], [ - AC_MSG_CHECKING(for libxml2 package) - CPPFLAGS="$CPPFLAGS `xml2-config --cflags` " - LDFLAGS="$LDFLAGS `xml2-config --libs` " - dnl The standard include paths worked. - _CHECK_LIBXML2(standard) - if test "$have_LIBXML2" == "no"; then - AC_MSG_ERROR(no. The required libxml2 package is missing.) - fi - ] -) + PKG_CHECK_MODULES([LIBXML], [libxml-2.0]) + CPPFLAGS="$CPPFLAGS $LIBXML_CFLAGS" + LDFLAGS="$LDFLAGS $LIBXML_LDFLAGS" + ]) AC_DEFUN([CHECK_LIBCU], [ From danms at us.ibm.com Mon Dec 10 15:54:05 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:54:05 -0700 Subject: [Libvirt-cim] [PATCH 0 of 5] #2 Build and configure cleanups Message-ID: Added /usr/local to PKG_CONFIG_PATH in the cleanups to configure.ac patch From danms at us.ibm.com Mon Dec 10 15:54:09 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:54:09 -0700 Subject: [Libvirt-cim] [PATCH 4 of 5] Clean up configure a little bit In-Reply-To: Message-ID: <999e44674d82ed135130.1197305649@theine> # HG changeset patch # User Dan Smith # Date 1197305646 28800 # Node ID 999e44674d82ed1351303ac73740cb61aa77bedf # Parent 0c5b0d0f26f501f56393fe0455e28ee2a1730629 Clean up configure a little bit Changes: - Added PKG_CONFIG_PATH for /usr/local package detection Signed-off-by: Dan Smith diff -r 0c5b0d0f26f5 -r 999e44674d82 acinclude.m4 --- a/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800 +++ b/acinclude.m4 Mon Dec 10 08:54:06 2007 -0800 @@ -242,47 +242,6 @@ AC_DEFUN([CHECK_LIBVIRT], LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" ]) -dnl -dnl The check for the SBLIM test suite -dnl Sets the TESTSUITEDIR variable and the TESTSUITE conditional -dnl - -AC_DEFUN([CHECK_TESTSUITE], - [ - AC_MSG_CHECKING(for SBLIM testsuite) - _DIRS="$datadir/sblim-testsuite" - save_exec_prefix=${exec_prefix} - save_prefix=${prefix} - if test xNONE == x${prefix}; then - prefix=/usr/local - fi - if test xNONE == x${exec_prefix}; then - exec_prefix=$prefix - fi - for _name in $_DIRS - do - AC_MSG_CHECKING( $_name ) - _xname=`eval echo $_name` - if test -x $_xname/run.sh ; then - dnl Found it - AC_MSG_RESULT(yes) - if test x"$TESTSUITEDIR" == x; then - TESTSUITEDIR=$_name - fi - AC_SUBST(TESTSUITEDIR) - break; - fi - done - if test x"$TESTSUITEDIR" == x ; then - AC_MSG_RESULT(no) - fi - AM_CONDITIONAL(TESTSUITE,[test x"$TESTSUITEDIR" != x]) - exec_prefix=$save_exec_prefix - prefix=$save_prefix - ] -) - - # A convenience macro that spits out a fail message for a particular test # # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) diff -r 0c5b0d0f26f5 -r 999e44674d82 configure.ac --- a/configure.ac Mon Dec 10 08:31:47 2007 -0800 +++ b/configure.ac Mon Dec 10 08:54:06 2007 -0800 @@ -3,7 +3,6 @@ AC_INIT(libvirt CMPI provider, 0.1, danm AC_INIT(libvirt CMPI provider, 0.1, danms at us.ibm.com, libvirt-cim) AC_CONFIG_SRCDIR([src/Virt_ComputerSystem.c]) -#AC_CONFIG_FILES([xen-kvm-cmpi.spec]) AC_CHECK_HEADERS([stdarg.h errno.h]) AC_CHECK_FUNCS([popen pclose fgets asprintf vfprintf fprintf snprintf sscanf]) @@ -31,8 +30,6 @@ AC_ARG_VAR([CIMSERVER],[the target CIM s ]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be install ed.]) -AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite is installed. -]) AC_ARG_WITH([kvm-max-nics], AC_HELP_STRING([--with-kvm-max-nics=X], @@ -98,38 +95,12 @@ AC_CONFIG_FILES([ AM_INIT_AUTOMAKE -# Check for the required C compiler AC_PROG_CC - -# Check for LEX/YACC -AC_PROG_LEX -AC_PROG_YACC - -# Check if the C compiler supports 'const' AC_C_CONST - -# Check for the required libtool AC_PROG_LIBTOOL - -# Check for the required install program AC_PROG_INSTALL - -# Check for some common required headers AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) - -# Check if the system headers conform to ANSI C AC_HEADER_STDC - -# Check for specific add on libraries that we know we'll need -# - libuuid -#AC_CHECK_LIB([uuid], [uuid_generate], [have_uuid=yes], [ -# AC_CHECK_FAIL(libuuid,e2fsprogs-devel) -# ]) - -# - libxenstore -#AC_CHECK_LIB([xenstore], [xs_read], [have_xen=yes], [ -# AC_CHECK_FAIL(libxenstore,xen-devel) -# ]) # Check for the required CMPI header files (this macro is defined in acinclude.m4) CHECK_CMPI @@ -141,25 +112,13 @@ CHECK_PROVIDERDIR # Check for presense of a CIM server (this macro is defined in acinclude.m4) CHECK_CIMSERVER -# Check for presense of libxml2 (this macro defined in acinclude.m4) -AC_CHECK_PROG([found_xml2_config],[xml2-config],[yes]) -AM_CONDITIONAL([found_xml2_config], [test x$found_xml2_config = xyes]) +# Check for presence of libraries +PKG_CONFIG_PATH=/usr/local/lib/pkgconfig +CHECK_LIBVIRT CHECK_LIBXML2 - -# Check for presense of libvirt (this macro is defined in acinclude.m4) -CHECK_LIBVIRT - -# Check for the SBLIM testsuite (this macro is defined in acinclude.m4) -CHECK_TESTSUITE -if test x"$TESTSUITEDIR" == x; then - TESTSUITE_SUPPORT=Disabled -else - TESTSUITE_SUPPORT=Enabled -fi +CHECK_LIBCU CFLAGS_STRICT="-Werror" - -CHECK_LIBCU AC_ARG_ENABLE([werror], [ --enable-werror enable werror on builds [[default=yes]]], @@ -178,10 +137,6 @@ echo "The following configuration option echo "The following configuration options have been selected:" echo " CIMSERVER: " $CIMSERVER echo " PROVIDERDIR: " $PROVIDERDIR -echo " TESTSUITE_SUPPORT: " $TESTSUITE_SUPPORT -if test x"$TESTSUITEDIR" != x; then - echo " TESTSUITEDIR: " $TESTSUITEDIR -fi echo " CPPFLAGS:" $CPPFLAGS echo echo "You can override these values by setting the corresponding" @@ -193,4 +148,3 @@ AC_OUTPUT(libvirt-cim.spec) AC_OUTPUT(libvirt-cim.spec) echo "You may now run make" - From danms at us.ibm.com Mon Dec 10 15:54:06 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 08:54:06 -0700 Subject: [Libvirt-cim] [PATCH 1 of 5] [RFC] Cleanup libvirt checks in acinclude.m4 In-Reply-To: Message-ID: <27dd39ce2e0d3c9b73ed.1197305646@theine> # HG changeset patch # User Dan Smith # Date 1197304307 28800 # Node ID 27dd39ce2e0d3c9b73edce39498acd7ac723b917 # Parent 6526275a35d9ebffc8bf2ad7295a843482d25293 [RFC] Cleanup libvirt checks in acinclude.m4 This changes the existing (hard to follow, debug, and change) libvirt detection code with the standard pkg-config method. This gives us an easy version check, as well as access to the package-specified information about CPPFLAGS and LDFLAGS. It also makes us obey the system package search path. Signed-off-by: Dan Smith diff -r 6526275a35d9 -r 27dd39ce2e0d acinclude.m4 --- a/acinclude.m4 Mon Dec 10 07:59:41 2007 -0800 +++ b/acinclude.m4 Mon Dec 10 08:31:47 2007 -0800 @@ -297,67 +297,12 @@ AC_DEFUN([CHECK_LIBCU], ] ) -dnl -dnl The check for the libvirt library -dnl Sets the LIBVIRTDIR variable -dnl - -AC_DEFUN([_CHECK_LIBVIRT], -[ - AC_MSG_CHECKING($1) - AC_TRY_LINK( - [ - #include - #include - ], - [ - virConnectPtr connectPtr; - ], - [ - have_LIBVIRT=yes - dnl AC_MSG_RESULT(yes) - ], - [ - have_LIBVIRT=no - dnl AC_MSG_RESULT(no) - ]) -]) - AC_DEFUN([CHECK_LIBVIRT], [ - AC_MSG_CHECKING(for libvirt package) - LIBVIRT_CPP_FLAGS="$CPPFLAGS" - dnl The standard include paths worked. - _CHECK_LIBVIRT(standard) - if test x"$LIBVIRTDIR" == x ; then - _DIRS_="/usr/include/libvirt \ - /usr/local/include/libvirt" - else - _DIRS_="$LIBVIRTDIR/include/libvirt" - fi - for _DIR_ in $_DIRS_ - do - _cppflags=$CPPFLAGS - _include_LIBVIRT="$_DIR_" - CPPFLAGS="$CPPFLAGS -I$_include_LIBVIRT" - _CHECK_LIBVIRT($_DIR_) - if test "$have_LIBVIRT" == "yes"; then - dnl Found it - AC_MSG_RESULT(yes) - dnl Save the new -I parameter - LIBVIRT_CPP_FLAGS="$CPPFLAGS" - LIBLIBVIRT=-lvirt - break - fi - CPPFLAGS=$_cppflags - done - CPPFLAGS=$LIBVIRT_CPP_FLAGS - AC_SUBST(LIBLIBVIRT) - if test "$have_LIBVIRT" == "no"; then - AC_MSG_ERROR(no. The required libvirt package is missing.) - fi - ] -) + PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) + CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" + LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" + ]) dnl dnl The check for the SBLIM test suite diff -r 6526275a35d9 -r 27dd39ce2e0d autoconfiscate.sh --- a/autoconfiscate.sh Mon Dec 10 07:59:41 2007 -0800 +++ b/autoconfiscate.sh Mon Dec 10 08:31:47 2007 -0800 @@ -18,5 +18,3 @@ autoconf --force && autoconf --force && echo "You may now run ./configure" -echo "You may now run ./configure LIBVIRTDIR=/usr/local" - diff -r 6526275a35d9 -r 27dd39ce2e0d configure.ac --- a/configure.ac Mon Dec 10 07:59:41 2007 -0800 +++ b/configure.ac Mon Dec 10 08:31:47 2007 -0800 @@ -31,7 +31,6 @@ AC_ARG_VAR([CIMSERVER],[the target CIM s ]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be install ed.]) -AC_ARG_VAR([LIBVIRTDIR],[the directory where the libvirt package is installed.]) AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite is installed. ]) @@ -179,7 +178,6 @@ echo "The following configuration option echo "The following configuration options have been selected:" echo " CIMSERVER: " $CIMSERVER echo " PROVIDERDIR: " $PROVIDERDIR -echo " LIBVIRTDIR: " $LIBVIRTDIR echo " TESTSUITE_SUPPORT: " $TESTSUITE_SUPPORT if test x"$TESTSUITEDIR" != x; then echo " TESTSUITEDIR: " $TESTSUITEDIR From kaitlin at linux.vnet.ibm.com Mon Dec 10 17:19:18 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 10 Dec 2007 09:19:18 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] #2 Build and configure cleanups In-Reply-To: References: Message-ID: <475D7516.60103@linux.vnet.ibm.com> Dan Smith wrote: > Added /usr/local to PKG_CONFIG_PATH in the cleanups to configure.ac patch > > Thanks! Adding /usr/local to PKG_CONFIG_PATH worked for me. Good set of changes - this helps make things more readable. =) +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Mon Dec 10 18:19:29 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 10 Dec 2007 10:19:29 -0800 Subject: [Libvirt-cim] [PATCH 0 of 3] #3 Add automated base schema In-Reply-To: References: Message-ID: <475D8331.6030809@linux.vnet.ibm.com> Dan Smith wrote: > Changes since last time are just those described by Heidi > This looks great to me and worked when I tested it. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Mon Dec 10 18:26:50 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 11:26:50 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Make migration spawn an asynchronous job In-Reply-To: Message-ID: <9a8027256eec1641b901.1197314810@theine> # HG changeset patch # User Dan Smith # Date 1197314773 28800 # Node ID 9a8027256eec1641b901477a63f7787c73edd1ee # Parent 3515a63e76897dec28f1543f9ce7172e5bae567d Make migration spawn an asynchronous job Signed-off-by: Dan Smith diff -r 3515a63e7689 -r 9a8027256eec src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Mon Dec 10 10:28:54 2007 -0800 +++ b/src/Virt_VSMigrationService.c Mon Dec 10 11:26:13 2007 -0800 @@ -22,6 +22,8 @@ #include #include +#include + #include #include @@ -35,6 +37,10 @@ #include "Virt_VSMigrationService.h" +#define CIM_JOBSTATE_STARTING 3 +#define CIM_JOBSTATE_RUNNING 4 +#define CIM_JOBSTATE_COMPLETE 7 + #define METHOD_RETURN(r, v) do { \ uint32_t rc = v; \ CMReturnData(r, (CMPIValue *)&rc, CMPI_uint32); \ @@ -42,12 +48,17 @@ const static CMPIBroker *_BROKER; -static const char *transport_from_ref(const CMPIObjectPath *ref) -{ - const char *cn; - - cn = CLASSNAME(ref); - +struct migration_job { + CMPIContext *context; + char *domain; + char *host; + char *ref_cn; + char *ref_ns; + char uuid[33]; +}; + +static const char *transport_from_class(const char *cn) +{ if (STARTS_WITH(cn, "Xen")) return "xen+ssh"; else if (STARTS_WITH(cn, "KVM")) @@ -56,15 +67,15 @@ static const char *transport_from_ref(co return NULL; } -static char *dest_uri(const CMPIObjectPath *ref, +static char *dest_uri(const char *cn, const char *dest) { char *uri; const char *tport = NULL; - tport = transport_from_ref(ref); + tport = transport_from_class(cn); if (tport == NULL) { - CU_DEBUG("Failed to get transport for %s", CLASSNAME(ref)); + CU_DEBUG("Failed to get transport for %s", cn); return NULL; } @@ -127,7 +138,7 @@ static CMPIStatus vs_migratable(const CM virConnectPtr dconn = NULL; uint32_t retcode = 1; - uri = dest_uri(ref, destination); + uri = dest_uri(CLASSNAME(ref), destination); if (uri == NULL) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -230,10 +241,48 @@ static CMPIStatus vs_migratable_system(C return vs_migratable(ref, name, dname, results); } -static CMPIStatus migrate_vs(const CMPIObjectPath *ref, - const char *domain, - const char *destination, - const CMPIResult *results) +static void migrate_job_set_state(struct migration_job *job, + uint16_t state, + const char *status) +{ + CMPIInstance *inst; + CMPIStatus s; + CMPIObjectPath *op; + + op = CMNewObjectPath(_BROKER, + job->ref_ns, + "Virt_MigrationJob", + &s); + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("Failed to create job path for update"); + return; + } + + CMSetNameSpace(op, job->ref_ns); + CMAddKey(op, "InstanceID", (CMPIValue *)job->uuid, CMPI_chars); + + CU_DEBUG("Getting job instance %s", job->uuid); + CU_DEBUG(" OP: %s", CMGetCharPtr(CMObjectPathToString(op, NULL))); + inst = CBGetInstance(_BROKER, job->context, op, NULL, &s); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) { + CU_DEBUG("Failed to get job instance for update (%i)", s.rc); + return; + } + + CMSetProperty(inst, "JobState", + (CMPIValue *)&state, CMPI_uint16); + CMSetProperty(inst, "Status", + (CMPIValue *)status, CMPI_chars); + + CU_DEBUG("Modifying job %s (%i:%s)", job->uuid, state, status); + + s = CBModifyInstance(_BROKER, job->context, op, inst, NULL); + if (s.rc != CMPI_RC_OK) + CU_DEBUG("Failed to update job instance: %s", + CMGetCharPtr(s.msg)); +} + +static CMPIStatus migrate_vs(struct migration_job *job) { CMPIStatus s; virConnectPtr conn = NULL; @@ -241,9 +290,8 @@ static CMPIStatus migrate_vs(const CMPIO virDomainPtr dom = NULL; virDomainPtr ddom = NULL; char *uri = NULL; - uint32_t retcode = 1; - - uri = dest_uri(ref, destination); + + uri = dest_uri(job->ref_cn, job->host); if (uri == NULL) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -251,16 +299,16 @@ static CMPIStatus migrate_vs(const CMPIO goto out; } - conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + conn = connect_by_classname(_BROKER, job->ref_cn, &s); if (conn == NULL) goto out; - dom = virDomainLookupByName(conn, domain); + dom = virDomainLookupByName(conn, job->domain); if (dom == NULL) { - CU_DEBUG("Failed to lookup `%s'", domain); - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Failed to lookup domain `%s'", domain); + CU_DEBUG("Failed to lookup `%s'", job->domain); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to lookup domain `%s'", job->domain); goto out; } @@ -273,7 +321,7 @@ static CMPIStatus migrate_vs(const CMPIO goto out; } - CU_DEBUG("Migrating %s -> %s", domain, uri); + CU_DEBUG("Migrating %s -> %s", job->domain, uri); ddom = virDomainMigrate(dom, dconn, VIR_MIGRATE_LIVE, NULL, NULL, 0); if (ddom == NULL) { @@ -285,17 +333,194 @@ static CMPIStatus migrate_vs(const CMPIO } CU_DEBUG("Migration succeeded"); - retcode = 0; CMSetStatus(&s, CMPI_RC_OK); out: - CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); - free(uri); virDomainFree(dom); virDomainFree(ddom); virConnectClose(conn); virConnectClose(dconn); + + return s; +} + +static CMPI_THREAD_RETURN migration_thread(struct migration_job *job) +{ + CMPIStatus s; + + CBAttachThread(_BROKER, job->context); + + CU_DEBUG("Migration Job %s started", job->uuid); + migrate_job_set_state(job, CIM_JOBSTATE_RUNNING, "Running"); + + s = migrate_vs(job); + + CU_DEBUG("Migration Job %s finished: %i", job->uuid, s.rc); + if (s.rc != CMPI_RC_OK) + migrate_job_set_state(job, + CIM_JOBSTATE_COMPLETE, + CMGetCharPtr(s.msg)); + else + migrate_job_set_state(job, + CIM_JOBSTATE_COMPLETE, + "Completed"); + + free(job->domain); + free(job->host); + free(job->ref_cn); + free(job->ref_ns); + free(job); + + return NULL; +} + +static CMPIInstance *_migrate_job_new_instance(const char *cn, + const char *ns) +{ + CMPIObjectPath *op; + CMPIInstance *inst; + CMPIStatus s; + + op = CMNewObjectPath(_BROKER, ns, cn, &s); + if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(op))) { + CU_DEBUG("Failed to create ref: %s:%s", ns, cn); + return NULL; + } + + inst = CMNewInstance(_BROKER, op, &s); + if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(op))) { + CU_DEBUG("Failed to create instance from ref: %s", + CMGetCharPtr(CMObjectPathToString(op, NULL))); + return NULL; + } + + return inst; +} + +static CMPIStatus migrate_create_job_instance(const CMPIContext *context, + struct migration_job *job, + CMPIObjectPath **job_op) +{ + CMPIStatus s; + CMPIInstance *jobinst; + CMPIDateTime *start; + CMPIBoolean autodelete = true; + uint16_t state = CIM_JOBSTATE_STARTING; + + start = CMNewDateTime(_BROKER, &s); + if ((s.rc != CMPI_RC_OK) || CMIsNullObject(start)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to get job start time"); + goto out; + } + + jobinst = _migrate_job_new_instance("Virt_MigrationJob", + job->ref_ns); + if (jobinst == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get instance of MigrationJob"); + goto out; + } + + CMSetProperty(jobinst, "InstanceID", + (CMPIValue *)job->uuid, CMPI_chars); + CMSetProperty(jobinst, "Name", + (CMPIValue *)"Migration", CMPI_chars); + CMSetProperty(jobinst, "StartTime", + (CMPIValue *)&start, CMPI_dateTime); + CMSetProperty(jobinst, "JobState", + (CMPIValue *)&state, CMPI_uint16); + CMSetProperty(jobinst, "Status", + (CMPIValue *)"Queued", CMPI_chars); + CMSetProperty(jobinst, "DeleteOnCompletion", + (CMPIValue *)&autodelete, CMPI_boolean); + + *job_op = CMGetObjectPath(jobinst, &s); + if ((*job_op == NULL) || (s.rc != CMPI_RC_OK)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to get path for job instance"); + goto out; + } + + CMSetNameSpace(*job_op, job->ref_ns); + + CU_DEBUG("Creating instance: %s", + CMGetCharPtr(CMObjectPathToString(*job_op, NULL))); + + *job_op = CBCreateInstance(_BROKER, context, *job_op, jobinst, &s); + if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(*job_op))) { + CU_DEBUG("Failed to create job instance: %i", s.rc); + goto out; + } + + out: + return s; +} + +static struct migration_job *migrate_job_prepare(const CMPIContext *context, + const CMPIObjectPath *ref, + const char *domain, + const char *host) +{ + struct migration_job *job; + uuid_t uuid; + + job = malloc(sizeof(*job)); + if (job == NULL) + return NULL; + + job->domain = strdup(domain); + job->host = strdup(host); + job->ref_cn = strdup(CLASSNAME(ref)); + job->ref_ns = strdup(NAMESPACE(ref)); + + uuid_generate(uuid); + uuid_unparse(uuid, job->uuid); + + job->context = CBPrepareAttachThread(_BROKER, context); + + return job; +} + +static CMPIStatus migrate_do(const CMPIObjectPath *ref, + const CMPIContext *context, + const char *domain, + const char *host, + const CMPIResult *results, + CMPIArgs *argsout) +{ + CMPIStatus s; + CMPIObjectPath *job_op; + struct migration_job *job; + CMPI_THREAD_TYPE thread; + uint32_t retcode = 1; + + job = migrate_job_prepare(context, ref, domain, host); + if (job == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to prepare migration job"); + goto out; + } + + CU_DEBUG("Prepared migration job %s", job->uuid); + + s = migrate_create_job_instance(context, job, &job_op); + if (s.rc != CMPI_RC_OK) + goto out; + + CMAddArg(argsout, "Job", (CMPIValue *)&job_op, CMPI_ref); + + thread = _BROKER->xft->newThread((void*)migration_thread, job, 0); + + retcode = 0; + + out: + CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); return s; } @@ -323,15 +548,15 @@ static CMPIStatus migrate_vs_host(CMPIMe return s; } - return migrate_vs(ref, name, dhost, results); + return migrate_do(ref, ctx, name, dhost, results, argsout); } static CMPIStatus migrate_vs_system(CMPIMethodMI *self, - const CMPIContext *ctx, - const CMPIResult *results, - const CMPIObjectPath *ref, - const CMPIArgs *argsin, - CMPIArgs *argsout) + const CMPIContext *ctx, + const CMPIResult *results, + const CMPIObjectPath *ref, + const CMPIArgs *argsin, + CMPIArgs *argsout) { CMPIStatus s; CMPIObjectPath *dsys; @@ -358,7 +583,7 @@ static CMPIStatus migrate_vs_system(CMPI return s; } - return migrate_vs(ref, name, dname, results); + return migrate_do(ref, ctx, name, dname, results, argsout); } static struct method_handler vsimth = { From danms at us.ibm.com Mon Dec 10 18:26:48 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 11:26:48 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add migration job support Message-ID: This set adds job support to migration, so that the migration methods return immediately with a job reference. The progress of the migration can be monitored by looking at Virt_MigrationJob instances. I left a good opening for indications (which will be necessary) by adding the migrate_job_set_state() function. This updates the state of the persistent job, which would be time(s) when we're looking to send an indication. Right now, Jobs are left in the persistent store after they're complete. Comments about the best policy for handling this are welcome. I know that I should be able to put a lifetime on them so they expire after completion, but I'm not sure if that's something that should be left to the client. From danms at us.ibm.com Mon Dec 10 18:26:49 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 11:26:49 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add MigrationJob schema In-Reply-To: Message-ID: <3515a63e76897dec28f1.1197314809@theine> # HG changeset patch # User Dan Smith # Date 1197311334 28800 # Node ID 3515a63e76897dec28f1543f9ce7172e5bae567d # Parent 70e9f11ed6d3ea63b342c4c3de68cc948d7c1cfd Add MigrationJob schema Signed-off-by: Dan Smith diff -r 70e9f11ed6d3 -r 3515a63e7689 schema/VSMigrationService.mof --- a/schema/VSMigrationService.mof Mon Dec 10 08:54:08 2007 -0800 +++ b/schema/VSMigrationService.mof Mon Dec 10 10:28:54 2007 -0800 @@ -33,6 +33,9 @@ class CIM_VirtualSystemMigrationService }; +class Virt_MigrationJob : CIM_ConcreteJob { +}; + class Xen_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { }; From grendel at linux.vnet.ibm.com Mon Dec 10 19:35:56 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 10 Dec 2007 14:35:56 -0500 Subject: [Libvirt-cim] [PATCH 0 of 5] #2 Build and configure cleanups In-Reply-To: <475D7516.60103@linux.vnet.ibm.com> References: <475D7516.60103@linux.vnet.ibm.com> Message-ID: <475D951C.2060006@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Dan Smith wrote: >> Added /usr/local to PKG_CONFIG_PATH in the cleanups to configure.ac >> patch >> >> > Thanks! Adding /usr/local to PKG_CONFIG_PATH worked for me. Good set > of changes - this helps make things more readable. =) +1 > Ditto to that. -- -Jay From danms at us.ibm.com Mon Dec 10 18:26:49 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 10 Dec 2007 11:26:49 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add MigrationJob schema In-Reply-To: Message-ID: <3515a63e76897dec28f1.1197314809@theine> # HG changeset patch # User Dan Smith # Date 1197311334 28800 # Node ID 3515a63e76897dec28f1543f9ce7172e5bae567d # Parent 70e9f11ed6d3ea63b342c4c3de68cc948d7c1cfd Add MigrationJob schema Signed-off-by: Dan Smith diff -r 70e9f11ed6d3 -r 3515a63e7689 schema/VSMigrationService.mof --- a/schema/VSMigrationService.mof Mon Dec 10 08:54:08 2007 -0800 +++ b/schema/VSMigrationService.mof Mon Dec 10 10:28:54 2007 -0800 @@ -33,6 +33,9 @@ class CIM_VirtualSystemMigrationService }; +class Virt_MigrationJob : CIM_ConcreteJob { +}; + class Xen_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { }; From kaitlin at linux.vnet.ibm.com Mon Dec 10 20:52:42 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 10 Dec 2007 12:52:42 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Add migration job support In-Reply-To: References: Message-ID: <475DA71A.604@linux.vnet.ibm.com> Dan Smith wrote: > This set adds job support to migration, so that the migration methods > return immediately with a job reference. The progress of the migration > can be monitored by looking at Virt_MigrationJob instances. > > I left a good opening for indications (which will be necessary) by adding > the migrate_job_set_state() function. This updates the state of the > persistent job, which would be time(s) when we're looking to send an > indication. > > Right now, Jobs are left in the persistent store after they're complete. > Comments about the best policy for handling this are welcome. I know that > I should be able to put a lifetime on them so they expire after completion, > but I'm not sure if that's something that should be left to the client. > I was finally able to test migration along with this patchset. Looks good. I didn't catch anything during the read through either. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Mon Dec 10 21:35:06 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 10 Dec 2007 13:35:06 -0800 Subject: [Libvirt-cim] [PATCH] Fix SDC - AllocationCapabilities - RASD returns error Message-ID: <6fdfdb1a22c5f790cfd0.1197322506@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197322131 28800 # Node ID 6fdfdb1a22c5f790cfd08538a3e29923ccd2237c # Parent 70e9f11ed6d3ea63b342c4c3de68cc948d7c1cfd Fix SDC - AllocationCapabilities - RASD returns error. Querying SDC using an AllocationCapabilities instance returns: "Could not get ResourceType". This is because SDC is expecting the AC ref to have the ResourceType defined. But ResourceType isn't a key, so SDC can be queried without specifying a value for ResourceType. Instead of using the ResourceType attribute, get the resource type from the InstanceID. Failing query: wbemcli ai -ac Xen_SettingsDefineCapabilities 'http://root:elm3b41 at localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"' Signed-off-by: Kaitlin Rupert diff -r 70e9f11ed6d3 -r 6fdfdb1a22c5 src/Makefile.am --- a/src/Makefile.am Mon Dec 10 08:54:08 2007 -0800 +++ b/src/Makefile.am Mon Dec 10 13:28:51 2007 -0800 @@ -102,9 +102,9 @@ libVirt_AllocationCapabilities_la_SOURCE libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c libVirt_AllocationCapabilities_la_LIBADD = -lVirt_RASD -lVirt_DevicePool -libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la +libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_Device.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c -libVirt_SettingsDefineCapabilities_la_LIBADD = -lVirt_RASD -lVirt_DevicePool +libVirt_SettingsDefineCapabilities_la_LIBADD = -lVirt_RASD -lVirt_DevicePool -lVirt_Device libVirt_RegisteredProfile_la_SOURCES = Virt_RegisteredProfile.c @@ -146,4 +146,4 @@ libVirt_ElementSettingData_la_LIBADD = - libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c -libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c \ No newline at end of file +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c diff -r 70e9f11ed6d3 -r 6fdfdb1a22c5 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Dec 10 08:54:08 2007 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Dec 10 13:28:51 2007 -0800 @@ -42,6 +42,7 @@ #include "Virt_SettingsDefineCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_Device.h" const static CMPIBroker *_BROKER; @@ -778,23 +779,31 @@ static CMPIStatus alloc_cap_to_rasd(cons struct inst_list *list) { CMPIStatus s = {CMPI_RC_OK}; - int ret; uint16_t type; + const char *id = NULL; if (!match_hypervisor_prefix(ref, info)) return s; CU_DEBUG("Getting ResourceType"); - ret = cu_get_u16_path(ref, "ResourceType", &type); - if (ret != CMPI_RC_OK) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Could not get ResourceType"); - goto out; - } - + if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID"); + goto out; + } + + type = device_type_from_classname(id); + CU_DEBUG("ResourceType: %hi", type); + + if (type == VIRT_DEV_UNKNOWN) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine resource type"); + goto out; + } s = sdc_rasds_for_type(ref, list, type); From zli at linux.vnet.ibm.com Tue Dec 11 07:44:29 2007 From: zli at linux.vnet.ibm.com (Zhengang Li) Date: Tue, 11 Dec 2007 15:44:29 +0800 Subject: [Libvirt-cim] VSMS method args type Message-ID: <475E3FDD.2000406@linux.vnet.ibm.com> Dan, I got this when writing the resource setting data related method test case for VSMS. In DMTF cimv216Experimental, we have: uint32 AddResourceSettings(CIM_VSSD REF AffectedConfiguration, string ResourceSettings[], CIM_RASD REF ResultingResourceSettings[], /* out */ CIM_ConcreteJob REF Job); /* out */ uint32 RemoveResourceSettings(CIM_RASD REF ResourceSettings[], CIM_ConcreteJob REF Job); /* out */ But in the VSMS provider, the handlers are defined as follows: static struct method_handler AddResourceSettings = { .name = "AddResourceSettings", .handler = add_resource_settings, .args = {{"AffectedConfiguration", CMPI_string}, /* dmtf mof says CMPI_ref here */ {"ResourceSettings", CMPI_stringA}, ARG_END } }; static struct method_handler RemoveResourceSettings = { .name = "RemoveResourceSettings", .handler = rm_resource_settings, .args = {{"ResourceSettings", CMPI_stringA}, /* dmtf mof says CMPI_refA here */ ARG_END } }; And the three add/modify/remove resource settings method handler are using the same helper function 'update_resource_settings' taking ResourceSettings as embedded instance string array. I think we need some code refactoring here for the three method handlers. -- - Zhengang From heidieck at linux.vnet.ibm.com Tue Dec 11 09:10:46 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 11 Dec 2007 11:10:46 +0200 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() Message-ID: <8ef14daa017090e8473e.1197367846@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197367712 -3600 # Node ID 8ef14daa017090e8473e1f958bc5e5e584032398 # Parent b5847180d00719ff39f2d451d4e79d4369952ad5 [CU] Merge do_ref() and do_assoc() The two functions do_ref() and do_assoc() run through the same logic. The only difference are the returned instances. By configuring the do_assoc() function with an additional paramter (ref_rslt) to inidcate the type of the returned instance(s) - either reference(names) or associator(names) - the two functions can be merged. Signed-off-by: Heidi Eckhart diff -r b5847180d007 -r 8ef14daa0170 std_association.c --- a/std_association.c Fri Dec 07 17:15:07 2007 -0500 +++ b/std_association.c Tue Dec 11 11:08:32 2007 +0100 @@ -226,21 +226,23 @@ static CMPIStatus do_assoc(struct std_as struct std_assoc_info *info, const CMPIResult *results, const CMPIObjectPath *ref, + bool ref_rslt, bool names_only) { CMPIStatus s = {CMPI_RC_OK, NULL}; struct inst_list list; struct std_assoc *handler; - - inst_list_init(&list); + int i; CU_DEBUG("Getting handler..."); handler = std_assoc_get_handler(ctx, info, ref); if (handler == NULL) { CU_DEBUG("No handler found."); - goto out; + return s; } CU_DEBUG("Getting handler succeeded."); + + inst_list_init(&list); CU_DEBUG("Calling handler->handler..."); s = handler->handler(ref, info, &list); @@ -257,73 +259,48 @@ static CMPIStatus do_assoc(struct std_as goto out; } - s = filter_results(&list, - NAMESPACE(ref), - info->result_class, - ctx->brkr); - if (s.rc != CMPI_RC_OK) { - CU_DEBUG("filter_results did not return CMPI_RC_OK."); - goto out; - } - - if (list.list == NULL) { - CU_DEBUG("List is empty."); - goto out; - } else { - CU_DEBUG("Returned %u instance(s).", list.cur); - } - - if (names_only) - cu_return_instance_names(results, &list); - else - cu_return_instances(results, &list); - - out: - inst_list_free(&list); - - return s; -} - -static CMPIStatus do_ref(struct std_assoc_ctx *ctx, - struct std_assoc_info *info, - const CMPIResult *results, - const CMPIObjectPath *ref, - bool names_only) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - struct inst_list list; - struct std_assoc *handler; - int i; - - inst_list_init(&list); - - CU_DEBUG("Getting handler..."); - handler = std_assoc_get_handler(ctx, info, ref); - if (handler == NULL) { - CU_DEBUG("No handler found."); - goto out; - } - CU_DEBUG("Getting handler succeeded."); - - CU_DEBUG("Calling handler->handler..."); - s = handler->handler(ref, info, &list); - if ((s.rc != CMPI_RC_OK) || (list.list == NULL)) - goto out; - - for (i = 0; i < list.cur; i++) { - CMPIInstance *refinst; - - refinst = handler->make_ref(ref, list.list[i], info, handler); - if (refinst == NULL) - continue; - + /* Associators and AssociatorNames */ + if (!ref_rslt) { + s = filter_results(&list, + NAMESPACE(ref), + info->result_class, + ctx->brkr); + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("filter_results did not return CMPI_RC_OK."); + goto out; + } + + if (list.list == NULL) { + CU_DEBUG("List is empty."); + goto out; + } else { + CU_DEBUG("Returned %u instance(s).", list.cur); + } + } + + /* References and ReferenceNames */ + if (ref_rslt) { + for (i = 0; i < list.cur; i++) { + CMPIInstance *refinst; + + refinst = handler->make_ref(ref, list.list[i], info, handler); + if (refinst == NULL) + continue; + + if (names_only) + cu_return_instance_name(results, refinst); + else + CMReturnInstance(results, refinst); + } + } + /* Associators and AssociatorNames */ + else { if (names_only) - cu_return_instance_name(results, refinst); + cu_return_instance_names(results, &list); else - CMReturnInstance(results, refinst); - } - - CMSetStatus(&s, CMPI_RC_OK); + cu_return_instances(results, &list); + } + out: inst_list_free(&list); @@ -359,6 +336,7 @@ CMPIStatus stda_AssociatorNames(CMPIAsso &info, results, reference, + false, true); } @@ -386,6 +364,7 @@ CMPIStatus stda_Associators(CMPIAssociat &info, results, reference, + false, false); } @@ -406,7 +385,12 @@ CMPIStatus stda_ReferenceNames(CMPIAssoc self->ft->miName, }; - return do_ref(self->hdl, &info, results, reference, true); + return do_assoc(self->hdl, + &info, + results, + reference, + true, + true); } CMPIStatus stda_References(CMPIAssociationMI *self, @@ -427,7 +411,12 @@ CMPIStatus stda_References(CMPIAssociati self->ft->miName, }; - return do_ref(self->hdl, &info, results, reference, false); + return do_assoc(self->hdl, + &info, + results, + reference, + true, + false); } /* From heidieck at linux.vnet.ibm.com Tue Dec 11 10:22:00 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 11 Dec 2007 11:22:00 +0100 Subject: [Libvirt-cim] [PATCH] Fix SDC - AllocationCapabilities - RASD returns error In-Reply-To: <6fdfdb1a22c5f790cfd0.1197322506@elm3b41.beaverton.ibm.com> References: <6fdfdb1a22c5f790cfd0.1197322506@elm3b41.beaverton.ibm.com> Message-ID: <475E64C8.2020707@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1197322131 28800 > # Node ID 6fdfdb1a22c5f790cfd08538a3e29923ccd2237c > # Parent 70e9f11ed6d3ea63b342c4c3de68cc948d7c1cfd > Fix SDC - AllocationCapabilities - RASD returns error. > > Querying SDC using an AllocationCapabilities instance returns: "Could not get ResourceType". This is because SDC is expecting the AC ref to have the ResourceType defined. But ResourceType isn't a key, so SDC can be queried without specifying a value for ResourceType. > > Instead of using the ResourceType attribute, get the resource type from the InstanceID. > > Failing query: > wbemcli ai -ac Xen_SettingsDefineCapabilities 'http://root:elm3b41 at localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"' > > Signed-off-by: Kaitlin Rupert Great job ! Thank you for investigating into this issue. :) Works for me. ... +1 -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Tue Dec 11 11:36:00 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 11 Dec 2007 12:36:00 +0100 Subject: [Libvirt-cim] [PATCH] Fix SDC - AllocationCapabilities - RASD returns error In-Reply-To: <6fdfdb1a22c5f790cfd0.1197322506@elm3b41.beaverton.ibm.com> References: <6fdfdb1a22c5f790cfd0.1197322506@elm3b41.beaverton.ibm.com> Message-ID: <475E7620.3090608@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1197322131 28800 > # Node ID 6fdfdb1a22c5f790cfd08538a3e29923ccd2237c > # Parent 70e9f11ed6d3ea63b342c4c3de68cc948d7c1cfd > Fix SDC - AllocationCapabilities - RASD returns error. > > Querying SDC using an AllocationCapabilities instance returns: "Could not get ResourceType". This is because SDC is expecting the AC ref to have the ResourceType defined. But ResourceType isn't a key, so SDC can be queried without specifying a value for ResourceType. > > Instead of using the ResourceType attribute, get the resource type from the InstanceID. > > Failing query: > wbemcli ai -ac Xen_SettingsDefineCapabilities 'http://root:elm3b41 at localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"' > > Signed-off-by: Kaitlin Rupert > Great job ! Thank you for investigating into this issue :). Works perfectly for me ... +1 -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Tue Dec 11 12:10:48 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 11 Dec 2007 14:10:48 +0200 Subject: [Libvirt-cim] [PATCH 0 of 2] SDC: Fixed type of returned instance and error code Message-ID: Patch 1: The returned RASD instances have been of the general classname ResourceAllocationSettingData instead of the type specific one, e.g. ProcResourceAllocationSettingData Patch 2: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK From heidieck at linux.vnet.ibm.com Tue Dec 11 12:10:49 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 11 Dec 2007 14:10:49 +0200 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: Message-ID: <838bd46416cc73ddf67e.1197378649@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197378558 -3600 # Node ID 838bd46416cc73ddf67eadce7dbda852927832ed # Parent 6fdfdb1a22c5f790cfd08538a3e29923ccd2237c SDC: returned instances are not of type specific subclass Signed-off-by: Heidi Eckhart diff -r 6fdfdb1a22c5 -r 838bd46416cc src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Dec 10 13:28:51 2007 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Dec 11 14:09:18 2007 +0100 @@ -659,6 +659,7 @@ static CMPIInstance *sdc_rasd_inst(const struct sdc_rasd_prop *prop_list; int i; char *inst_id; + char *base = NULL; uint16_t resource_type; /* Defaults for the following are from CIM_SettingsDefineCapabilities.mof. */ @@ -705,10 +706,26 @@ static CMPIInstance *sdc_rasd_inst(const if (s->rc != CMPI_RC_OK) goto out; - inst = get_typed_instance(broker, - CLASSNAME(ref), - "ResourceAllocationSettingData", - NAMESPACE(ref)); + switch(rasd->resource_type) { + case CIM_RASD_TYPE_MEM: + base = "MemResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_PROC: + base = "ProcResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_NET: + base = "NetResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_DISK: + base = "DiskResourceAllocationSettingData"; + break; + } + + if (base) + inst = get_typed_instance(broker, + CLASSNAME(ref), + base, + NAMESPACE(ref)); CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars); CMSetProperty(inst, "PropertyPolicy", &policy, CMPI_uint16); From heidieck at linux.vnet.ibm.com Tue Dec 11 12:10:50 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 11 Dec 2007 14:10:50 +0200 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1197378563 -3600 # Node ID e2644a839312b446a3621327118667b33fca6057 # Parent 838bd46416cc73ddf67eadce7dbda852927832ed SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK Signed-off-by: Heidi Eckhart diff -r 838bd46416cc -r e2644a839312 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Dec 11 14:09:18 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Dec 11 14:09:23 2007 +0100 @@ -832,8 +832,8 @@ static CMPIStatus rasd_to_alloc_cap(cons struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s = {CMPI_RC_OK}; - + CMPIStatus s = {CMPI_RC_ERR_NOT_SUPPORTED}; + /* This direction of the association currently not supported. */ return s; From grendel at linux.vnet.ibm.com Tue Dec 11 15:45:02 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Tue, 11 Dec 2007 10:45:02 -0500 Subject: [Libvirt-cim] sfcb: Internal Provider SIGSEGV Message-ID: <475EB07E.9070808@linux.vnet.ibm.com> I have encountered a situation that causes a segfault in sfcb's internal provider. I am writing an indication provider, and using a fairly simple python script that sets up a filter, a handler, and a subscription to monitor my indication. This works fine. The problem occurs when I try to unsubscribe. My indication is deactivated, but as this is happening I see the segfault. I found this problem while running 1.2.4, so I tested with the current cvs head and got identical results. Here is the stdout from sfcbd, run with no arguments. root at halga /usr/include/cmpi # sfcbd --- sfcbd V1.3preview started - 29864 --- Using /usr/local/etc/sfcb/sfcb.cfg --- SSL not configured --- User authentication disabled --- Max provider procs: 32 --- initSocketPairs: 64 --- Max Http procs: 8 --- sfcbd HTTP Daemon V1.3preview started - 29866 - port 5988 --- Keep-alive timeout: 1 seconds --- Maximum requests per connection: 10 --- localConnectServer started --- Caching ClassProvider for /usr/local/var/lib/sfcb/registration/repository/root/virt/classSchemas (1.0-3) using 3584 bytes --- Caching ClassProvider for /usr/local/var/lib/sfcb/registration/repository/root/interop/classSchemas (1.0-3) using 1092 bytes Virt_ComputerSystemModifiedIndication.c(213): ActivateFilter Virt_ComputerSystemModifiedIndication.c(213): ActivateFilter Virt_ComputerSystemModifiedIndication.c(244): ComputerSystemModifiedIndication enabled Virt_ComputerSystemModifiedIndication.c(186): entering event loop Virt_ComputerSystemModifiedIndication.c(256): ComputerSystemModifiedIndication disabled -#- InternalProvider - 29876 provider exiting due to a SIGSEGV signal Virt_ComputerSystemModifiedIndication.c(201): exiting event loop All of the "Virt_ComputerSystemModifiedIndication.c(foo): ..." lines are debug lines from my provider. It seems to be receiving the deactivation correctly from sfcb, but the segfault causes the subscription, handler, and filter to not be removed correctly. Generally, I have to run "killall -9 sfcbd && sfcbrepos" to get things back to a working state. The indication provider itself is not doing anything complicated. It just sets up a simple event loop that doesn't do much of anything other than wait to be deactivated. Now for the XML that our python script uses to set up and tear down the filter, handler, and subscription. My apologies for the length. I grouped the creates with their respective deletes for ease of comparison; the order we actually run them in is CreateFilter, CreateHandler, CreateSubscription, then DeleteSubscription, DeleteHandler, DeleteFilter. CreateFilter: CIM_ComputerSystem localhost.localdomain CIM_IndicationFilter TestFilter SELECT * FROM CIM_InstModification WQL root/virt DeleteFilter: CIM_ComputerSystem localhost.localdomain CIM_IndicationFilterCIMXML TestFilter ; CreateHandler: CIM_ComputerSystem localhost.localdomain CIM_IndicationHandlerCIMXML TestHandler localhost:8000 DeleteHandler: CIM_ComputerSystem localhost.localdomain CIM_IndicationHandlerCIMXML TestHandler ; CreateSubscription: CIM_ComputerSystem localhost.localdomain CIM_IndicationFilter TestFilter CIM_ComputerSystem localhost.localdomain CIM_IndicationHandlerCIMXML TestHandler 2 DeleteSubscription: CIM_ComputerSystem localhost.localdomain CIM_IndicationFilter TestFilter CIM_ComputerSystem localhost.localdomain CIM_IndicationHandlerCIMXML TestHandler ; Thanks! -- -Jay From kaitlin at linux.vnet.ibm.com Tue Dec 11 16:35:14 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 08:35:14 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <8ef14daa017090e8473e.1197367846@localhost.localdomain> References: <8ef14daa017090e8473e.1197367846@localhost.localdomain> Message-ID: <475EBC42.3090504@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1197367712 -3600 > # Node ID 8ef14daa017090e8473e1f958bc5e5e584032398 > # Parent b5847180d00719ff39f2d451d4e79d4369952ad5 > [CU] Merge do_ref() and do_assoc() > Nice change Heidi! I like how this condenses things. I did a quick test with this patch - the associations and references I tested looked fine. Everything looked good on the read through as well. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Tue Dec 11 16:37:47 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 11 Dec 2007 08:37:47 -0800 Subject: [Libvirt-cim] VSMS method args type In-Reply-To: <475E3FDD.2000406@linux.vnet.ibm.com> (Zhengang Li's message of "Tue, 11 Dec 2007 15:44:29 +0800") References: <475E3FDD.2000406@linux.vnet.ibm.com> Message-ID: <87ir35nq5g.fsf@theine.beaverton.ibm.com> ZL> And the three add/modify/remove resource settings method handler ZL> are using the same helper function 'update_resource_settings' ZL> taking ResourceSettings as embedded instance string array. Are you specifically noting that we don't return a Job? The std_invokemethod handler specification doesn't take outgoing parameters into account, so those shouldn't be specified there. Further, we make these changes synchronously, so we don't need to return a job in any of these cases. The CMPI_stringA type is used right now because we're not testing on a EO-enabled CIMOM, which means the embedded instance comes to us as a string (or string array, depending), which we must parse ourselves. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Tue Dec 11 16:54:35 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 11 Dec 2007 08:54:35 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <8ef14daa017090e8473e.1197367846@localhost.localdomain> (Heidi Eckhart's message of "Tue, 11 Dec 2007 11:10:46 +0200") References: <8ef14daa017090e8473e.1197367846@localhost.localdomain> Message-ID: <87abohnpdg.fsf@theine.beaverton.ibm.com> HE> # HG changeset patch HE> # User Heidi Eckhart HE> # Date 1197367712 -3600 HE> # Node ID 8ef14daa017090e8473e1f958bc5e5e584032398 HE> # Parent b5847180d00719ff39f2d451d4e79d4369952ad5 HE> [CU] Merge do_ref() and do_assoc() I'm supportive of this change, however, I have a few comments. HE> + /* Associators and AssociatorNames */ HE> + if (!ref_rslt) { HE> + s = filter_results(&list, HE> + NAMESPACE(ref), HE> + info->result_class, HE> + ctx->brkr); HE> + if (s.rc != CMPI_RC_OK) { HE> + CU_DEBUG("filter_results did not return CMPI_RC_OK."); HE> + goto out; HE> + } HE> + HE> + if (list.list == NULL) { HE> + CU_DEBUG("List is empty."); HE> + goto out; HE> + } else { HE> + CU_DEBUG("Returned %u instance(s).", list.cur); HE> + } HE> + } Adding these additional clauses to do_assoc() makes the function too long and confusing, IMHO. It was already rather long after recent additions. Lets take this opportunity to refine it a bit. I think that we should be able to boil down the (ref_rslt == NULL) and (ref_rslt != NULL) cases into two small helper functions. Each should build a result list. Thus, we can have two lists, one that is the result of the handler, and one that is to be returned. So, we can clean it up like this: if (ref_rslt) ref_case(&handler_result, &to_return, info); else assoc_case(&handler_result, &to_return, info); if (names_only) cu_return_instance_names(results, &to_return); else cu_return_instances(results, &to_return); The filtering case of associators would be in assoc_case(), the make_ref() calls would be in ref_case(). HE> + /* References and ReferenceNames */ HE> + if (ref_rslt) { HE> + for (i = 0; i < list.cur; i++) { HE> + CMPIInstance *refinst; HE> + HE> + refinst = handler->make_ref(ref, list.list[i], info, handler); HE> + if (refinst == NULL) HE> + continue; HE> + HE> + if (names_only) HE> + cu_return_instance_name(results, refinst); HE> + else HE> + CMReturnInstance(results, refinst); HE> + } HE> + } HE> + /* Associators and AssociatorNames */ HE> + else { HE> if (names_only) HE> - cu_return_instance_name(results, refinst); HE> + cu_return_instance_names(results, &list); HE> else HE> - CMReturnInstance(results, refinst); HE> - } HE> - HE> - CMSetStatus(&s, CMPI_RC_OK); HE> + cu_return_instances(results, &list); HE> + } HE> + This would then clear up this (IMHO, very confusing) case where you first have a associators case, then an "if references, else associators" case right behind it. Thoughts? If I have been too confusing in my explanation, I will be glad to take your patch and post a modified version to illustrate my intent. Thanks Heidi! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Tue Dec 11 18:09:06 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 10:09:06 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Fix SDC - AllocationCapabilities to RASD error. Message-ID: This patch set includes a function that uses a resource pool InstanceID to determine the resource type. SDC has been updated to use this function instead of using the ref's ResourceType attribute (which might not be available). Updates from original patchset: Was using device_type_from_classname(), which is intended to get the resource type from Device instance classnames. It doesn't properly support resource pool InstanceIDs. From kaitlin at linux.vnet.ibm.com Tue Dec 11 18:09:07 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 10:09:07 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Adding a function that returns resource type based on poolid In-Reply-To: Message-ID: <23183bc1e0f3c33038cd.1197396547@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197394928 28800 # Node ID 23183bc1e0f3c33038cd67b69613fb081fc8c2e3 # Parent 70e9f11ed6d3ea63b342c4c3de68cc948d7c1cfd Adding a function that returns resource type based on poolid. The following function takes a string (the resource pool's InstanceID) and parses it to determine the corresponding resource type. Signed-off-by: Kaitlin Rupert diff -r 70e9f11ed6d3 -r 23183bc1e0f3 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Mon Dec 10 08:54:08 2007 -0800 +++ b/src/Virt_DevicePool.c Tue Dec 11 09:42:08 2007 -0800 @@ -268,6 +268,20 @@ char *pool_member_of(const CMPIBroker *b return poolid; } +int device_type_from_poolid(const char *id) +{ + if (strstr(id, "NetworkPool")) + return VIRT_DEV_NET; + else if (strstr(id, "DiskPool")) + return VIRT_DEV_DISK; + else if (strstr(id, "Memory")) + return VIRT_DEV_MEM; + else if (strstr(id, "Processor")) + return VIRT_DEV_VCPU; + else + return VIRT_DEV_UNKNOWN; +} + static bool mempool_set_total(CMPIInstance *inst, virConnectPtr conn) { virNodeInfo info; diff -r 70e9f11ed6d3 -r 23183bc1e0f3 src/Virt_DevicePool.h --- a/src/Virt_DevicePool.h Mon Dec 10 08:54:08 2007 -0800 +++ b/src/Virt_DevicePool.h Tue Dec 11 09:42:08 2007 -0800 @@ -56,6 +56,13 @@ char *pool_member_of(const CMPIBroker *b const char *id); /** + * * Get the device type of a given pool from the pool's InstanceID + * * + * * @param id The InstanceID of the pool + * */ +int device_type_from_poolid(const char *id); + +/** * Get all device pools on the system for the given connection * * @param broker The current Broker From kaitlin at linux.vnet.ibm.com Tue Dec 11 18:09:08 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 10:09:08 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Fix SDC - AllocationCapabilities - RASD returns error In-Reply-To: Message-ID: <6c3ca59055416d7bb077.1197396548@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197394944 28800 # Node ID 6c3ca59055416d7bb07716d3a750800e6087878e # Parent 23183bc1e0f3c33038cd67b69613fb081fc8c2e3 Fix SDC - AllocationCapabilities - RASD returns error. Querying SDC using an AllocationCapabilities instance returns: "Could not get ResourceType". This is because SDC is expecting the AC ref to have the ResourceType defined. But ResourceType isn't a key, so SDC can be queried without specifying a value for ResourceType. Instead of using the ResourceType attribute, get the resource type from the InstanceID. Failing query: wbemcli ai -ac Xen_SettingsDefineCapabilities 'http://localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"' Signed-off-by: Kaitlin Rupert diff -r 23183bc1e0f3 -r 6c3ca5905541 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Dec 11 09:42:08 2007 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Dec 11 09:42:24 2007 -0800 @@ -778,23 +778,31 @@ static CMPIStatus alloc_cap_to_rasd(cons struct inst_list *list) { CMPIStatus s = {CMPI_RC_OK}; - int ret; uint16_t type; + const char *id = NULL; if (!match_hypervisor_prefix(ref, info)) return s; CU_DEBUG("Getting ResourceType"); - ret = cu_get_u16_path(ref, "ResourceType", &type); - if (ret != CMPI_RC_OK) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Could not get ResourceType"); - goto out; - } - + if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID"); + goto out; + } + + type = device_type_from_poolid(id); + CU_DEBUG("ResourceType: %hi", type); + + if (type == VIRT_DEV_UNKNOWN) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine resource type"); + goto out; + } s = sdc_rasds_for_type(ref, list, type); From kaitlin at linux.vnet.ibm.com Tue Dec 11 18:03:55 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 10:03:55 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: <838bd46416cc73ddf67e.1197378649@localhost.localdomain> References: <838bd46416cc73ddf67e.1197378649@localhost.localdomain> Message-ID: <475ED10B.40601@linux.vnet.ibm.com> Heidi Eckhart wrote: > > + if (base) > + inst = get_typed_instance(broker, > + CLASSNAME(ref), > + base, > + NAMESPACE(ref)); > > CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars); > CMSetProperty(inst, "PropertyPolicy", &policy, CMPI_uint16); > Should there be an else statement here? If the if statement fails, then an instance isn't created. CMSetProperty() would be trying to get the value of a NULL inst, which would most likely fail. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Dec 11 18:10:26 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 10:10:26 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <87abohnpdg.fsf@theine.beaverton.ibm.com> References: <8ef14daa017090e8473e.1197367846@localhost.localdomain> <87abohnpdg.fsf@theine.beaverton.ibm.com> Message-ID: <475ED292.5000705@linux.vnet.ibm.com> Dan Smith wrote: > Adding these additional clauses to do_assoc() makes the function too > long and confusing, IMHO. It was already rather long after recent > additions. Lets take this opportunity to refine it a bit. > > I think that we should be able to boil down the (ref_rslt == NULL) and > (ref_rslt != NULL) cases into two small helper functions. Each should > build a result list. > > Thus, we can have two lists, one that is the result of the handler, > and one that is to be returned. So, we can clean it up like this: > > if (ref_rslt) > ref_case(&handler_result, &to_return, info); > else > assoc_case(&handler_result, &to_return, info); > > if (names_only) > cu_return_instance_names(results, &to_return); > else > cu_return_instances(results, &to_return); > > The filtering case of associators would be in assoc_case(), the > make_ref() calls would be in ref_case(). > This makes sense to me, and I think it's a good suggestion. This also makes it clearer which piece is collecting references and which is collecting associators. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From grendel at linux.vnet.ibm.com Tue Dec 11 18:35:15 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Tue, 11 Dec 2007 13:35:15 -0500 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: <475ED10B.40601@linux.vnet.ibm.com> References: <838bd46416cc73ddf67e.1197378649@localhost.localdomain> <475ED10B.40601@linux.vnet.ibm.com> Message-ID: <475ED863.3040707@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Heidi Eckhart wrote: >> + if (base) >> + inst = get_typed_instance(broker, >> + CLASSNAME(ref), >> + base, >> + NAMESPACE(ref)); >> CMSetProperty(inst, "InstanceID", inst_id, >> CMPI_chars); >> CMSetProperty(inst, "PropertyPolicy", &policy, CMPI_uint16); >> > Should there be an else statement here? If the if statement fails, > then an instance isn't created. CMSetProperty() would be trying to > get the value of a NULL inst, which would most likely fail. > Seems like a good idea to me. Just something simple that sets status as appropriate and bails is all that should be necessary there. -- -Jay From kaitlin at linux.vnet.ibm.com Tue Dec 11 20:47:17 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 12:47:17 -0800 Subject: [Libvirt-cim] [PATCH] GetInstance() does not return an instance that matches the instanceID given Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197405880 28800 # Node ID daf4ce2d8c17b0c5bbe410a5a0d67bf5544f52ce # Parent 6c3ca59055416d7bb07716d3a750800e6087878e GetInstance() does not return an instance that matches the instanceID given. Add a argument to return_ele_cap() that handles the GetInstance(). If this argument is set, get the InstanceID from the ref. In the loop that walks through the domains on the system, check to see if this id matches one of the names returned. If there is a match, create the instance and then exit from the loop. If no match is found, an error is returned. Failing query: wbemcli gi http://localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities.InstanceID="kaitlin_test" localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities.InstanceID="kaitlin_test" Caption,Description,InstanceID="hd_domain",ElementName,ElementNameEditSupported=FALSE,MaxElementNameLen,RequestedStatesSupported=2,3,9,10,11,ElementNameMask,StateAwareness,CreationClassName="Xen_EnabledLogicalElementCapabilities" Signed-off-by: Kaitlin Rupert diff -r 6c3ca5905541 -r daf4ce2d8c17 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Tue Dec 11 09:42:24 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Tue Dec 11 12:44:40 2007 -0800 @@ -21,6 +21,7 @@ */ #include #include +#include #include #include @@ -135,7 +136,8 @@ CMPIStatus get_ele_cap(const CMPIBroker static CMPIStatus return_ele_cap(const CMPIObjectPath *ref, const CMPIResult *results, - int names_only) + int names_only, + int get_instance) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; @@ -144,10 +146,20 @@ static CMPIStatus return_ele_cap(const C int count; int i; const char *name; + const char* id; conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); if (conn == NULL) goto out; + + if (get_instance) { + if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "No InstanceID specified"); + goto out; + } + } count = get_domain_list(conn, &list); if (count <= 0) @@ -162,6 +174,11 @@ static CMPIStatus return_ele_cap(const C goto end; } + if (get_instance) { + if (!STREQ(name, id)) + goto end; + } + s = get_ele_cap(_BROKER, ref, name, &inst); if (s.rc != CMPI_RC_OK) goto end; @@ -174,7 +191,7 @@ static CMPIStatus return_ele_cap(const C end: virDomainFree(list[i]); - if (s.rc != CMPI_RC_OK) + if ((s.rc != CMPI_RC_OK) || (STREQ(name, id))) goto out; } @@ -191,7 +208,7 @@ static CMPIStatus EnumInstanceNames(CMPI const CMPIResult *results, const CMPIObjectPath *reference) { - return return_ele_cap(reference, results, 1); + return return_ele_cap(reference, results, 1, 0); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -201,7 +218,7 @@ static CMPIStatus EnumInstances(CMPIInst const char **properties) { - return return_ele_cap(reference, results, 0); + return return_ele_cap(reference, results, 0, 0); } static CMPIStatus GetInstance(CMPIInstanceMI *self, @@ -210,7 +227,7 @@ static CMPIStatus GetInstance(CMPIInstan const CMPIObjectPath *reference, const char **properties) { - return return_ele_cap(reference, results, 0); + return return_ele_cap(reference, results, 0, 1); } DEFAULT_CI(); From danms at us.ibm.com Tue Dec 11 21:15:47 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 11 Dec 2007 13:15:47 -0800 Subject: [Libvirt-cim] [PATCH] GetInstance() does not return an instance that matches the instanceID given In-Reply-To: (Kaitlin Rupert's message of "Tue, 11 Dec 2007 12:47:17 -0800") References: Message-ID: <87r6htlypo.fsf@theine.beaverton.ibm.com> KR> + if (get_instance) { KR> + if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { KR> + cu_statusf(_BROKER, &s, KR> + CMPI_RC_ERR_FAILED, KR> + "No InstanceID specified"); KR> + goto out; KR> + } KR> + } How about we move this to the actual GetInstance() function? That will avoid the double-nest. Then pass an id, or NULL if none, instead of the boolean. That makes this drop the first level of nesting as well: KR> + if (get_instance) { KR> + if (!STREQ(name, id)) KR> + goto end; KR> + } KR> + Shouldn't add anything redundant and would be much cleaner, IMHO. What do you think? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Tue Dec 11 21:18:48 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 13:18:48 -0800 Subject: [Libvirt-cim] [PATCH] GetInstance() does not return an instance that matches the instanceID given In-Reply-To: <87r6htlypo.fsf@theine.beaverton.ibm.com> References: <87r6htlypo.fsf@theine.beaverton.ibm.com> Message-ID: <475EFEB8.6010605@linux.vnet.ibm.com> Dan Smith wrote: > KR> + if (get_instance) { > KR> + if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { > KR> + cu_statusf(_BROKER, &s, > KR> + CMPI_RC_ERR_FAILED, > KR> + "No InstanceID specified"); > KR> + goto out; > KR> + } > KR> + } > > How about we move this to the actual GetInstance() function? That > will avoid the double-nest. > > Then pass an id, or NULL if none, instead of the boolean. That makes > this drop the first level of nesting as well: > > KR> + if (get_instance) { > KR> + if (!STREQ(name, id)) > KR> + goto end; > KR> + } > KR> + > > Shouldn't add anything redundant and would be much cleaner, IMHO. > What do you think? > Yes, that's a much cleaner approach. =) Will send out an updated patch. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Dec 11 22:08:03 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Dec 2007 14:08:03 -0800 Subject: [Libvirt-cim] [PATCH] Message-ID: <8761c7b39ea87feb54f8.1197410883@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197410852 28800 # Node ID 8761c7b39ea87feb54f89e41e1a7044104ec9399 # Parent 6c3ca59055416d7bb07716d3a750800e6087878e #2 GetInstance() does not return an instance that matches the instanceID given. Updates - removed boolean and now use a string, get instanceID in GetInstance() call instead. Add a argument to return_ele_cap() that handles the GetInstance(). If this argument is set, get the InstanceID from the ref. In the loop that walks through the domains on the system, check to see if this id matches one of the names returned. If there is a match, create the instance and then exit from the loop. If no match is found, an error is returned. Failing query: wbemcli gi http://localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities.InstanceID="kaitlin_test" localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities.InstanceID="kaitlin_test" Caption,Description,InstanceID="hd_domain",ElementName,ElementNameEditSupported=FALSE,MaxElementNameLen,RequestedStatesSupported=2,3,9,10,11,ElementNameMask,StateAwareness,CreationClassName="Xen_EnabledLogicalElementCapabilities" Signed-off-by: Kaitlin Rupert diff -r 6c3ca5905541 -r 8761c7b39ea8 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Tue Dec 11 09:42:24 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Tue Dec 11 14:07:32 2007 -0800 @@ -21,6 +21,7 @@ */ #include #include +#include #include #include @@ -135,7 +136,8 @@ CMPIStatus get_ele_cap(const CMPIBroker static CMPIStatus return_ele_cap(const CMPIObjectPath *ref, const CMPIResult *results, - int names_only) + int names_only, + const char *id) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; @@ -162,6 +164,9 @@ static CMPIStatus return_ele_cap(const C goto end; } + if (id && (!STREQ(name, id))) + goto end; + s = get_ele_cap(_BROKER, ref, name, &inst); if (s.rc != CMPI_RC_OK) goto end; @@ -174,7 +179,7 @@ static CMPIStatus return_ele_cap(const C end: virDomainFree(list[i]); - if (s.rc != CMPI_RC_OK) + if ((s.rc != CMPI_RC_OK) || (id && (STREQ(name, id)))) goto out; } @@ -191,7 +196,7 @@ static CMPIStatus EnumInstanceNames(CMPI const CMPIResult *results, const CMPIObjectPath *reference) { - return return_ele_cap(reference, results, 1); + return return_ele_cap(reference, results, 1, NULL); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -201,7 +206,7 @@ static CMPIStatus EnumInstances(CMPIInst const char **properties) { - return return_ele_cap(reference, results, 0); + return return_ele_cap(reference, results, 0, NULL); } static CMPIStatus GetInstance(CMPIInstanceMI *self, @@ -210,7 +215,17 @@ static CMPIStatus GetInstance(CMPIInstan const CMPIObjectPath *reference, const char **properties) { - return return_ele_cap(reference, results, 0); + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char* id; + + if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "No InstanceID specified"); + return s; + } + + return return_ele_cap(reference, results, 0, id); } DEFAULT_CI(); From danms at us.ibm.com Tue Dec 11 22:00:15 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 11 Dec 2007 14:00:15 -0800 Subject: [Libvirt-cim] [PATCH] In-Reply-To: <8761c7b39ea87feb54f8.1197410883@elm3b41.beaverton.ibm.com> (Kaitlin Rupert's message of "Tue, 11 Dec 2007 14:08:03 -0800") References: <8761c7b39ea87feb54f8.1197410883@elm3b41.beaverton.ibm.com> Message-ID: <87mysgnb80.fsf@theine.beaverton.ibm.com> KR> # HG changeset patch KR> # User Kaitlin Rupert KR> # Date 1197410852 28800 KR> # Node ID 8761c7b39ea87feb54f89e41e1a7044104ec9399 KR> # Parent 6c3ca59055416d7bb07716d3a750800e6087878e KR> #2 GetInstance() does not return an instance that matches the KR> instanceID given. I like this much better. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Wed Dec 12 15:46:48 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 08:46:48 -0700 Subject: [Libvirt-cim] [PATCH] Make 'clean' remove temporary files and patch rejects Message-ID: <85e3ec9836b74c4d3424.1197478008@theine> # HG changeset patch # User Dan Smith # Date 1197477639 28800 # Node ID 85e3ec9836b74c4d3424fc4e67d7c6a22c00863d # Parent 2854fb11364df047bb6d275e72034145b2260c71 Make 'clean' remove temporary files and patch rejects Signed-off-by: Dan Smith diff -r 2854fb11364d -r 85e3ec9836b7 Makefile.am --- a/Makefile.am Tue Dec 11 14:51:07 2007 -0800 +++ b/Makefile.am Wed Dec 12 08:40:39 2007 -0800 @@ -104,3 +104,8 @@ preuninstall: rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) + +clean-local: + rm -f $(find . -name "*.orig") + rm -f $(find . -name "*.rej") + rm -f $(find . -name "*~") \ No newline at end of file From danms at us.ibm.com Wed Dec 12 15:48:20 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 08:48:20 -0700 Subject: [Libvirt-cim] [PATCH] Make schema zip download during 'build', not 'dist' Message-ID: # HG changeset patch # User Dan Smith # Date 1197477759 28800 # Node ID c9edd5bc7202c0ee76bfba68aac98fd97ca87b34 # Parent 85e3ec9836b74c4d3424fc4e67d7c6a22c00863d Make schema zip download during 'build', not 'dist' This makes the tarball not include the zip, which is close to 2MB in size. I think it's safe to assume that users of the tarball can allow the wget of the zip file during build. For the RPM, I will make it download the zip during 'dist' so that the SRPM already contains it. Signed-off-by: Dan Smith diff -r 85e3ec9836b7 -r c9edd5bc7202 base_schema/Makefile.am --- a/base_schema/Makefile.am Wed Dec 12 08:40:39 2007 -0800 +++ b/base_schema/Makefile.am Wed Dec 12 08:42:39 2007 -0800 @@ -2,8 +2,9 @@ CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experi CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experimental CIM_SCHEMA_ZIP = cimv$(CIM_SCHEMA_REL)-MOFs.zip -dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof +pkgdata_DATA = $(CIM_SCHEMA_ZIP) +dist_pkgdata_DATA = fix_schema.patch cimv216-interop_mof dist_pkgdata_SCRIPTS = install_base_schema.sh $(CIM_SCHEMA_ZIP): - wget http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCHEMA_ZIP) \ No newline at end of file + wget http://www.dmtf.org/standards/cim/cim_schema_v$(CIM_SCHEMA_VER)/$(CIM_SCHEMA_ZIP) From danms at us.ibm.com Wed Dec 12 15:50:35 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 08:50:35 -0700 Subject: [Libvirt-cim] [PATCH] RPM spec updates Message-ID: # HG changeset patch # User Dan Smith # Date 1197478221 28800 # Node ID de0e1bd9377b3e3325eec951ed0b0bf5100f565c # Parent c9edd5bc7202c0ee76bfba68aac98fd97ca87b34 RPM spec updates - Restart the CIMOM after base schema installation - Installed file cleanups - Permissions cleanups - Require correct version of libvirt - Require unzip, since we need it for base schema unpacking - Require explicit verison of libxml2 (for rpmlint). I have no idea what version is actually required, so I took the F8 version. If someone has an opinion or complaint about this, I'm happy to change it. Signed-off-by: Dan Smith diff -r c9edd5bc7202 -r de0e1bd9377b libvirt-cim.spec.in --- a/libvirt-cim.spec.in Wed Dec 12 08:42:39 2007 -0800 +++ b/libvirt-cim.spec.in Wed Dec 12 08:50:21 2007 -0800 @@ -9,10 +9,11 @@ Source: libvirt-cim-%{version}.tar.gz Source: libvirt-cim-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/CIM/ -Requires: libxml2 -Requires: libvirt >= 0.2.3 +Requires: libxml2 >= 2.6.30 +Requires: libvirt >= 0.3.2 +Requires: unzip BuildRequires: tog-pegasus-devel -BuildRequires: libvirt-devel >= 0.2.3 +BuildRequires: libvirt-devel >= 0.3.2 BuildRequires: e2fsprogs-devel BuildRequires: libxml2-devel BuildRequires: libcmpiutil-devel @@ -26,7 +27,8 @@ platforms with a single provider. %prep %setup -q -chmod -x src/* libxkutil/* schema/* +chmod -x src/* libxkutil/* schema/* README doc/* base_schema/README* +chmod +X src/* libxkutil/* schema/* %build %configure --disable-werror @@ -40,6 +42,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/libxkutil.so %clean rm -fr $RPM_BUILD_ROOT @@ -57,22 +60,24 @@ rm -fr $RPM_BUILD_ROOT %{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} +/etc/init.d/tog-pegasus restart + %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n /@CIM_VIRT_NS@ \ - -r %{REGISTRATION} -m %{SCHEMA} || true + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true %preun %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ -n /@CIM_VIRT_NS@ \ - -r %{REGISTRATION} -m %{SCHEMA} || true + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true %postun -p /sbin/ldconfig %files %defattr(-, root, root) -%doc README doc/CodingStyle doc/SubmittingPatches -%doc provider-register.sh +%doc README COPYING doc/CodingStyle doc/SubmittingPatches +%doc base_schema/README.DMTF %doc doc/*.html %{_libdir}/lib*.so* %{_libdir}/cmpi/lib*.so* From veillard at redhat.com Wed Dec 12 17:30:35 2007 From: veillard at redhat.com (Daniel Veillard) Date: Wed, 12 Dec 2007 12:30:35 -0500 Subject: [Libvirt-cim] [PATCH] Make schema zip download during 'build', not 'dist' In-Reply-To: References: Message-ID: <20071212173035.GC2974@redhat.com> On Wed, Dec 12, 2007 at 08:48:20AM -0700, Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1197477759 28800 > # Node ID c9edd5bc7202c0ee76bfba68aac98fd97ca87b34 > # Parent 85e3ec9836b74c4d3424fc4e67d7c6a22c00863d > Make schema zip download during 'build', not 'dist' > > This makes the tarball not include the zip, which is close to 2MB in size. > I think it's safe to assume that users of the tarball can allow the wget > of the zip file during build. For the RPM, I will make it download the I don't think it's a good assumption. For example it may break in some build system where the machines are not allowed to access outside machine. Keep it in the dist, it's heavier, but the only reasonnable safe way. Also if you were to rebuild the package from source say 2 years from now, the zip may not be available anymore from that URL. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From veillard at redhat.com Wed Dec 12 17:32:36 2007 From: veillard at redhat.com (Daniel Veillard) Date: Wed, 12 Dec 2007 12:32:36 -0500 Subject: [Libvirt-cim] [PATCH] RPM spec updates In-Reply-To: References: Message-ID: <20071212173235.GD2974@redhat.com> On Wed, Dec 12, 2007 at 08:50:35AM -0700, Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1197478221 28800 > # Node ID de0e1bd9377b3e3325eec951ed0b0bf5100f565c > # Parent c9edd5bc7202c0ee76bfba68aac98fd97ca87b34 > RPM spec updates > > - Restart the CIMOM after base schema installation > - Installed file cleanups > - Permissions cleanups > - Require correct version of libvirt > - Require unzip, since we need it for base schema unpacking > - Require explicit verison of libxml2 (for rpmlint). I have no idea what > version is actually required, so I took the F8 version. If someone has > an opinion or complaint about this, I'm happy to change it. just use something like libxml2 >= 2.6.0, there is no reason to break that build for example on a RHEL box because of a too tight libxml2 dep. [...] > +Requires: libxml2 >= 2.6.30 too tight IMHO :-) Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From danms at us.ibm.com Wed Dec 12 17:39:00 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 09:39:00 -0800 Subject: [Libvirt-cim] [PATCH] Make schema zip download during 'build', not 'dist' In-Reply-To: <20071212173035.GC2974@redhat.com> (Daniel Veillard's message of "Wed, 12 Dec 2007 12:30:35 -0500") References: <20071212173035.GC2974@redhat.com> Message-ID: <8763z3n77v.fsf@theine.beaverton.ibm.com> DV> I don't think it's a good assumption. For example it may break in DV> some build system where the machines are not allowed to access DV> outside machine. Okay, that's valid. DV> Also if you were to rebuild the package from source say 2 years DV> from now, the zip may not be available anymore from that URL. It's possible, but I think the DMTF will be pretty good about preserving that. Anyway, that's fine. I'll nuke this patch. Thanks :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Wed Dec 12 17:40:13 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 09:40:13 -0800 Subject: [Libvirt-cim] [PATCH] RPM spec updates In-Reply-To: <20071212173235.GD2974@redhat.com> (Daniel Veillard's message of "Wed, 12 Dec 2007 12:32:36 -0500") References: <20071212173235.GD2974@redhat.com> Message-ID: <871w9rn75u.fsf@theine.beaverton.ibm.com> DV> just use something like libxml2 >= 2.6.0, there is no reason to DV> break that build for example on a RHEL box because of a too tight DV> libxml2 dep. >> +Requires: libxml2 >= 2.6.30 DV> too tight IMHO :-) 'tis why I asked :) I'll change it. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Wed Dec 12 16:41:22 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 09:41:22 -0700 Subject: [Libvirt-cim] [PATCH] RPM spec updates Message-ID: # HG changeset patch # User Dan Smith # Date 1197481264 28800 # Node ID c37e79945f4f7272be9f4ffa2d464aed09e3b445 # Parent 85e3ec9836b74c4d3424fc4e67d7c6a22c00863d RPM spec updates - Restart the CIMOM after base schema installation - Installed file cleanups - Permissions cleanups - Require correct version of libvirt - Require unzip, since we need it for base schema unpacking - Require explicit verison of libxml2 (for rpmlint). I have no idea what version is actually required, so I took the F8 version. If someone has an opinion or complaint about this, I'm happy to change it. Signed-off-by: Dan Smith diff -r 85e3ec9836b7 -r c37e79945f4f libvirt-cim.spec.in --- a/libvirt-cim.spec.in Wed Dec 12 08:40:39 2007 -0800 +++ b/libvirt-cim.spec.in Wed Dec 12 09:41:04 2007 -0800 @@ -9,10 +9,11 @@ Source: libvirt-cim-%{version}.tar.gz Source: libvirt-cim-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/CIM/ -Requires: libxml2 -Requires: libvirt >= 0.2.3 +Requires: libxml2 >= 2.6.0 +Requires: libvirt >= 0.3.2 +Requires: unzip BuildRequires: tog-pegasus-devel -BuildRequires: libvirt-devel >= 0.2.3 +BuildRequires: libvirt-devel >= 0.3.2 BuildRequires: e2fsprogs-devel BuildRequires: libxml2-devel BuildRequires: libcmpiutil-devel @@ -26,7 +27,8 @@ platforms with a single provider. %prep %setup -q -chmod -x src/* libxkutil/* schema/* +chmod -x src/* libxkutil/* schema/* README doc/* base_schema/README* +chmod +X src/* libxkutil/* schema/* %build %configure --disable-werror @@ -40,6 +42,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/libxkutil.so %clean rm -fr $RPM_BUILD_ROOT @@ -57,22 +60,24 @@ rm -fr $RPM_BUILD_ROOT %{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} +/etc/init.d/tog-pegasus restart + %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n /@CIM_VIRT_NS@ \ - -r %{REGISTRATION} -m %{SCHEMA} || true + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true %preun %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ -n /@CIM_VIRT_NS@ \ - -r %{REGISTRATION} -m %{SCHEMA} || true + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true %postun -p /sbin/ldconfig %files %defattr(-, root, root) -%doc README doc/CodingStyle doc/SubmittingPatches -%doc provider-register.sh +%doc README COPYING doc/CodingStyle doc/SubmittingPatches +%doc base_schema/README.DMTF %doc doc/*.html %{_libdir}/lib*.so* %{_libdir}/cmpi/lib*.so* From danms at us.ibm.com Wed Dec 12 17:47:02 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 09:47:02 -0800 Subject: [Libvirt-cim] [PATCH] RPM spec updates In-Reply-To: (Dan Smith's message of "Wed, 12 Dec 2007 09:41:22 -0700") References: Message-ID: <87wsrjlsa1.fsf@theine.beaverton.ibm.com> DS> - Require explicit verison of libxml2 (for rpmlint). I have no idea what DS> version is actually required, so I took the F8 version. If someone has DS> an opinion or complaint about this, I'm happy to change it. I forgot to refresh before sending this out, but the version in my repo now has the above bullet replaced with: - Require explicit verison of libxml2 (for rpmlint) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Wed Dec 12 19:16:44 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Dec 2007 11:16:44 -0800 Subject: [Libvirt-cim] [PATCH] Make 'clean' remove temporary files and patch rejects In-Reply-To: <85e3ec9836b74c4d3424.1197478008@theine> References: <85e3ec9836b74c4d3424.1197478008@theine> Message-ID: <4760339C.4050409@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1197477639 28800 > # Node ID 85e3ec9836b74c4d3424fc4e67d7c6a22c00863d > # Parent 2854fb11364df047bb6d275e72034145b2260c71 > Make 'clean' remove temporary files and patch rejects > This seems reasonable enough. =) +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Wed Dec 12 18:22:21 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Dec 2007 11:22:21 -0700 Subject: [Libvirt-cim] [PATCH] Fix VSMS.RemoveResources() to take references instead of EOs Message-ID: <59eb8770d96a71707804.1197487341@theine> # HG changeset patch # User Dan Smith # Date 1197487329 28800 # Node ID 59eb8770d96a71707804f26aec48ae76531b005e # Parent b6c16e5a2a347b1e6a6fe314864865a9c6152532 Fix VSMS.RemoveResources() to take references instead of EOs This just adds a filter function that converts the references into instances. It could be more efficient, but I think that allowing all of the resource operations to remain largely identical (as they did before) is worth the small amount of overhead here. Also added REF2STR() macro to misc_util.h. I do this a lot, mostly while testing, but it seems valid to have such a macro so we can start printing out more useful error messages with ease. Signed-off-by: Dan Smith diff -r b6c16e5a2a34 -r 59eb8770d96a libxkutil/misc_util.h --- a/libxkutil/misc_util.h Wed Dec 12 09:42:09 2007 -0800 +++ b/libxkutil/misc_util.h Wed Dec 12 11:22:09 2007 -0800 @@ -129,6 +129,8 @@ CMPIInstance *make_reference(const CMPIB assoc); \ } +#define REF2STR(r) CMGetCharPtr(CMObjectPathToString(r, NULL)) + /* * Local Variables: * mode: C diff -r b6c16e5a2a34 -r 59eb8770d96a src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Dec 12 09:42:09 2007 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Wed Dec 12 11:22:09 2007 -0800 @@ -947,6 +947,59 @@ static CMPIStatus update_resource_settin return s; } +static CMPIStatus rasd_refs_to_insts(const CMPIContext *ctx, + const CMPIObjectPath *reference, + CMPIArray *arr, + struct inst_list *list) +{ + CMPIStatus s; + int i; + int c; + + c = CMGetArrayCount(arr, &s); + if (s.rc != CMPI_RC_OK) + return s; + + for (i = 0; i < c; i++) { + CMPIData d; + CMPIObjectPath *ref; + CMPIInstance *inst; + const char *id; + uint16_t type; + + d = CMGetArrayElementAt(arr, i, &s); + ref = d.value.ref; + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("Unable to get ResourceSettings[%i]", i); + continue; + } + + if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { + CU_DEBUG("Unable to get InstanceID of `%s'", + REF2STR(ref)); + continue; + } + + if (rasd_type_from_classname(CLASSNAME(ref), &type) != + CMPI_RC_OK) { + CU_DEBUG("Unable to get type of `%s'", + REF2STR(ref)); + continue; + } + + inst = get_rasd_instance(ctx, reference, _BROKER, id, type); + if (inst != NULL) + inst_list_add(list, inst); + else + CU_DEBUG("Failed to get instance for `%s'", + REF2STR(ref)); + } + + CMSetStatus(&s, CMPI_RC_OK); + + return s; +} + static CMPIStatus add_resource_settings(CMPIMethodMI *self, const CMPIContext *context, const CMPIResult *results, @@ -974,7 +1027,32 @@ static CMPIStatus rm_resource_settings(C const CMPIArgs *argsin, CMPIArgs *argsout) { - return update_resource_settings(reference, argsin, resource_del); + /* The RemoveResources case is different from either Add or + * Modify, because it takes references instead of instances + */ + + CMPIArray *arr; + CMPIStatus s; + struct inst_list list; + + inst_list_init(&list); + + if (cu_get_array_arg(argsin, "ResourceSettings", &arr) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing ResourceSettings"); + goto out; + } + + s = rasd_refs_to_insts(context, reference, arr, &list); + if (s.rc != CMPI_RC_OK) + goto out; + + s = _update_resource_settings(reference, &list, resource_del); + out: + inst_list_free(&list); + + return s; } static struct method_handler DefineSystem = { @@ -1023,7 +1101,7 @@ static struct method_handler RemoveResou static struct method_handler RemoveResourceSettings = { .name = "RemoveResourceSettings", .handler = rm_resource_settings, - .args = {{"ResourceSettings", CMPI_stringA}, + .args = {{"ResourceSettings", CMPI_refA}, ARG_END } }; From veillard at redhat.com Wed Dec 12 22:55:44 2007 From: veillard at redhat.com (Daniel Veillard) Date: Wed, 12 Dec 2007 17:55:44 -0500 Subject: [Libvirt-cim] [PATCH] RPM spec updates In-Reply-To: References: Message-ID: <20071212225544.GA2045@redhat.com> On Wed, Dec 12, 2007 at 09:41:22AM -0700, Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1197481264 28800 > # Node ID c37e79945f4f7272be9f4ffa2d464aed09e3b445 > # Parent 85e3ec9836b74c4d3424fc4e67d7c6a22c00863d > RPM spec updates > > - Restart the CIMOM after base schema installation > - Installed file cleanups > - Permissions cleanups > - Require correct version of libvirt > - Require unzip, since we need it for base schema unpacking > - Require explicit verison of libxml2 (for rpmlint). I have no idea what > version is actually required, so I took the F8 version. If someone has > an opinion or complaint about this, I'm happy to change it. Looks good to me, +1 :-) Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From kaitlin at linux.vnet.ibm.com Thu Dec 13 01:05:27 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Dec 2007 17:05:27 -0800 Subject: [Libvirt-cim] [PATCH] Fix VSMS.RemoveResources() to take references instead of EOs In-Reply-To: <59eb8770d96a71707804.1197487341@theine> References: <59eb8770d96a71707804.1197487341@theine> Message-ID: <47608557.4060401@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1197487329 28800 > # Node ID 59eb8770d96a71707804f26aec48ae76531b005e > # Parent b6c16e5a2a347b1e6a6fe314864865a9c6152532 > Fix VSMS.RemoveResources() to take references instead of EOs > Nice! I really like the REF2STR() macro. The rest of it looks good to me. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From zli at linux.vnet.ibm.com Thu Dec 13 01:16:04 2007 From: zli at linux.vnet.ibm.com (Zhengang Li) Date: Thu, 13 Dec 2007 09:16:04 +0800 Subject: [Libvirt-cim] [PATCH] Fix VSMS.RemoveResources() to take references instead of EOs In-Reply-To: <59eb8770d96a71707804.1197487341@theine> References: <59eb8770d96a71707804.1197487341@theine> Message-ID: <476087D4.8050208@linux.vnet.ibm.com> Cool! Thanks for such a quick fix! Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1197487329 28800 > # Node ID 59eb8770d96a71707804f26aec48ae76531b005e > # Parent b6c16e5a2a347b1e6a6fe314864865a9c6152532 > Fix VSMS.RemoveResources() to take references instead of EOs > > This just adds a filter function that converts the references into > instances. It could be more efficient, but I think that allowing all > of the resource operations to remain largely identical (as they did before) > is worth the small amount of overhead here. > > Also added REF2STR() macro to misc_util.h. I do this a lot, mostly > while testing, but it seems valid to have such a macro so we can start > printing out more useful error messages with ease. > > Signed-off-by: Dan Smith > > diff -r b6c16e5a2a34 -r 59eb8770d96a libxkutil/misc_util.h > --- a/libxkutil/misc_util.h Wed Dec 12 09:42:09 2007 -0800 > +++ b/libxkutil/misc_util.h Wed Dec 12 11:22:09 2007 -0800 > @@ -129,6 +129,8 @@ CMPIInstance *make_reference(const CMPIB > assoc); \ > } > > +#define REF2STR(r) CMGetCharPtr(CMObjectPathToString(r, NULL)) > + > /* > * Local Variables: > * mode: C > diff -r b6c16e5a2a34 -r 59eb8770d96a src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Wed Dec 12 09:42:09 2007 -0800 > +++ b/src/Virt_VirtualSystemManagementService.c Wed Dec 12 11:22:09 2007 -0800 > @@ -947,6 +947,59 @@ static CMPIStatus update_resource_settin > return s; > } > > +static CMPIStatus rasd_refs_to_insts(const CMPIContext *ctx, > + const CMPIObjectPath *reference, > + CMPIArray *arr, > + struct inst_list *list) > +{ > + CMPIStatus s; > + int i; > + int c; > + > + c = CMGetArrayCount(arr, &s); > + if (s.rc != CMPI_RC_OK) > + return s; > + > + for (i = 0; i < c; i++) { > + CMPIData d; > + CMPIObjectPath *ref; > + CMPIInstance *inst; > + const char *id; > + uint16_t type; > + > + d = CMGetArrayElementAt(arr, i, &s); > + ref = d.value.ref; > + if (s.rc != CMPI_RC_OK) { > + CU_DEBUG("Unable to get ResourceSettings[%i]", i); > + continue; > + } > + > + if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { > + CU_DEBUG("Unable to get InstanceID of `%s'", > + REF2STR(ref)); > + continue; > + } > + > + if (rasd_type_from_classname(CLASSNAME(ref), &type) != > + CMPI_RC_OK) { > + CU_DEBUG("Unable to get type of `%s'", > + REF2STR(ref)); > + continue; > + } > + > + inst = get_rasd_instance(ctx, reference, _BROKER, id, type); > + if (inst != NULL) > + inst_list_add(list, inst); > + else > + CU_DEBUG("Failed to get instance for `%s'", > + REF2STR(ref)); > + } > + > + CMSetStatus(&s, CMPI_RC_OK); > + > + return s; > +} > + > static CMPIStatus add_resource_settings(CMPIMethodMI *self, > const CMPIContext *context, > const CMPIResult *results, > @@ -974,7 +1027,32 @@ static CMPIStatus rm_resource_settings(C > const CMPIArgs *argsin, > CMPIArgs *argsout) > { > - return update_resource_settings(reference, argsin, resource_del); > + /* The RemoveResources case is different from either Add or > + * Modify, because it takes references instead of instances > + */ > + > + CMPIArray *arr; > + CMPIStatus s; > + struct inst_list list; > + > + inst_list_init(&list); > + > + if (cu_get_array_arg(argsin, "ResourceSettings", &arr) != CMPI_RC_OK) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Missing ResourceSettings"); > + goto out; > + } > + > + s = rasd_refs_to_insts(context, reference, arr, &list); > + if (s.rc != CMPI_RC_OK) > + goto out; > + > + s = _update_resource_settings(reference, &list, resource_del); > + out: > + inst_list_free(&list); > + > + return s; > } > > static struct method_handler DefineSystem = { > @@ -1023,7 +1101,7 @@ static struct method_handler RemoveResou > static struct method_handler RemoveResourceSettings = { > .name = "RemoveResourceSettings", > .handler = rm_resource_settings, > - .args = {{"ResourceSettings", CMPI_stringA}, > + .args = {{"ResourceSettings", CMPI_refA}, > ARG_END > } > }; > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- - Zhengang From yunguol at cn.ibm.com Thu Dec 13 02:37:53 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 13 Dec 2007 10:37:53 +0800 Subject: [Libvirt-cim] Failing query of AllocationCapabilities, GetInstance() does not return an instance Message-ID: The result of ein AllocationCapabilites is correct: wbemcli ein http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="MemoryPool/0" localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="DiskPool/foo" localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/xenbr0" localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/virbr0" But failing qurey of gi AllocationCapabilities: wbemcli gi http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" * * wbemcli: Cim: (1) CIM_ERR_FAILED: A general error occurred that is not covered by a more specific error code: "Could not get ResourceType." * Below is part of Virt_AllocationCapabilities provider's code: static CMPIStatus GetInstance(CMPIInstanceMI *self, const CMPIContext *context, const CMPIResult *results, const CMPIObjectPath *reference, const char **properties) { return return_alloc_cap(reference, results, 0); } static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, const CMPIContext *context, const CMPIResult *results, const CMPIObjectPath *reference) { return alloc_cap_instances(_BROKER, reference, results, true, NULL); } I think the causing issue it the same as Xen_EnabledLogicalElementCapabilities provider. Thanks! Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From heidieck at linux.vnet.ibm.com Thu Dec 13 10:03:46 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 13 Dec 2007 11:03:46 +0100 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <87abohnpdg.fsf@theine.beaverton.ibm.com> References: <8ef14daa017090e8473e.1197367846@localhost.localdomain> <87abohnpdg.fsf@theine.beaverton.ibm.com> Message-ID: <47610382.5060800@linux.vnet.ibm.com> Dan Smith wrote: > Adding these additional clauses to do_assoc() makes the function too > long and confusing, IMHO. It was already rather long after recent > additions. Lets take this opportunity to refine it a bit. > > I think that we should be able to boil down the (ref_rslt == NULL) and > (ref_rslt != NULL) cases into two small helper functions. Each should > build a result list. > [...] > This would then clear up this (IMHO, very confusing) case where you > first have a associators case, then an "if references, else > associators" case right behind it. > > Thoughts? > Thank you for your feedback. I will rework the patch as suggested (hopefully got it ;) ) and send out the patch. Thanks ... Heidi -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Thu Dec 13 09:11:11 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 13 Dec 2007 11:11:11 +0200 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() Message-ID: <0b30c3a70c3aa076d8aa.1197540671@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197540659 -3600 # Node ID 0b30c3a70c3aa076d8aac5a6cf63af06413b056c # Parent b5847180d00719ff39f2d451d4e79d4369952ad5 [CU] Merge do_ref() and do_assoc() The two functions do_ref() and do_assoc() run through the same logic. The only difference are the returned instances. By configuring the do_assoc() function with an additional paramter (ref_rslt) to inidcate the type of the returned instance(s) - either reference(names) or associator(names) - the two functions can be merged. Signed-off-by: Heidi Eckhart diff -r b5847180d007 -r 0b30c3a70c3a std_association.c --- a/std_association.c Fri Dec 07 17:15:07 2007 -0500 +++ b/std_association.c Thu Dec 13 11:10:59 2007 +0100 @@ -222,108 +222,111 @@ std_assoc_get_handler(const struct std_a return NULL; } +static CMPIStatus prepare_ref_return_list(struct std_assoc *handler, + struct std_assoc_info *info, + const CMPIObjectPath *ref, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list tmp_list; + int i; + + tmp_list = *list; + if (tmp_list.list == NULL) + return s; + + inst_list_init(list); + + for (i = 0; i < tmp_list.cur; i++) { + CMPIInstance *refinst; + + refinst = handler->make_ref(ref, tmp_list.list[i], info, handler); + if (refinst == NULL) + continue; + + inst_list_add(list, refinst); + } + + inst_list_free(&tmp_list); + return s; +} + +static CMPIStatus prepare_assoc_return_list(const CMPIBroker *broker, + struct std_assoc_info *info, + const CMPIObjectPath *ref, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (list->list == NULL) + return s; + + s = filter_results(list, + NAMESPACE(ref), + info->result_class, + broker); + + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("filter_results did not return CMPI_RC_OK."); + return s; + } + + return s; +} + static CMPIStatus do_assoc(struct std_assoc_ctx *ctx, struct std_assoc_info *info, const CMPIResult *results, const CMPIObjectPath *ref, + bool ref_rslt, bool names_only) { CMPIStatus s = {CMPI_RC_OK, NULL}; struct inst_list list; struct std_assoc *handler; - inst_list_init(&list); - - CU_DEBUG("Getting handler..."); + CU_DEBUG("Getting handler ..."); handler = std_assoc_get_handler(ctx, info, ref); if (handler == NULL) { CU_DEBUG("No handler found."); - goto out; + return s; } CU_DEBUG("Getting handler succeeded."); - CU_DEBUG("Calling handler->handler..."); + 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; - } else { - CU_DEBUG("Handler returned CMPI_RC_OK."); - } - - if (list.list == NULL) { - CU_DEBUG("List is empty."); + } + CU_DEBUG("Handler returned CMPI_RC_OK."); + + /* References and ReferenceNames */ + if (ref_rslt) + s = prepare_ref_return_list(handler, + info, + ref, + &list); + /* Associators and AssociatorNames */ + else + s = prepare_assoc_return_list(ctx->brkr, + info, + ref, + &list); + + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("Prepare return list did not return CMPI_RC_OK."); goto out; } - - s = filter_results(&list, - NAMESPACE(ref), - info->result_class, - ctx->brkr); - if (s.rc != CMPI_RC_OK) { - CU_DEBUG("filter_results did not return CMPI_RC_OK."); - goto out; - } - - if (list.list == NULL) { - CU_DEBUG("List is empty."); - goto out; - } else { - CU_DEBUG("Returned %u instance(s).", list.cur); - } + CU_DEBUG("Returned %u instance(s).", list.cur); if (names_only) cu_return_instance_names(results, &list); else cu_return_instances(results, &list); - out: - inst_list_free(&list); - - return s; -} - -static CMPIStatus do_ref(struct std_assoc_ctx *ctx, - struct std_assoc_info *info, - const CMPIResult *results, - const CMPIObjectPath *ref, - bool names_only) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - struct inst_list list; - struct std_assoc *handler; - int i; - - inst_list_init(&list); - - CU_DEBUG("Getting handler..."); - handler = std_assoc_get_handler(ctx, info, ref); - if (handler == NULL) { - CU_DEBUG("No handler found."); - goto out; - } - CU_DEBUG("Getting handler succeeded."); - - CU_DEBUG("Calling handler->handler..."); - s = handler->handler(ref, info, &list); - if ((s.rc != CMPI_RC_OK) || (list.list == NULL)) - goto out; - - for (i = 0; i < list.cur; i++) { - CMPIInstance *refinst; - - refinst = handler->make_ref(ref, list.list[i], info, handler); - if (refinst == NULL) - continue; - - if (names_only) - cu_return_instance_name(results, refinst); - else - CMReturnInstance(results, refinst); - } - - CMSetStatus(&s, CMPI_RC_OK); out: inst_list_free(&list); @@ -359,6 +362,7 @@ CMPIStatus stda_AssociatorNames(CMPIAsso &info, results, reference, + false, true); } @@ -386,6 +390,7 @@ CMPIStatus stda_Associators(CMPIAssociat &info, results, reference, + false, false); } @@ -406,7 +411,12 @@ CMPIStatus stda_ReferenceNames(CMPIAssoc self->ft->miName, }; - return do_ref(self->hdl, &info, results, reference, true); + return do_assoc(self->hdl, + &info, + results, + reference, + true, + true); } CMPIStatus stda_References(CMPIAssociationMI *self, @@ -427,7 +437,12 @@ CMPIStatus stda_References(CMPIAssociati self->ft->miName, }; - return do_ref(self->hdl, &info, results, reference, false); + return do_assoc(self->hdl, + &info, + results, + reference, + true, + false); } /* From heidieck at linux.vnet.ibm.com Thu Dec 13 10:05:10 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 13 Dec 2007 12:05:10 +0200 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 - SDC: Fixed type of returned instance and error code Message-ID: Patch 1: The returned RASD instances have been of the general classname ResourceAllocationSettingData instead of the type specific one, e.g. ProcResourceAllocationSettingData Patch 2: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK Diff to #1: patch 1: fixed missing check for unknown resource type From heidieck at linux.vnet.ibm.com Thu Dec 13 10:05:11 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 13 Dec 2007 12:05:11 +0200 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: Message-ID: <733f1e73fe50ea102d9c.1197543911@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197543884 -3600 # Node ID 733f1e73fe50ea102d9c8942e3dfb0bbca2e6f91 # Parent 86999a1e8fac6f6cee5ca62a4005ca37759713ff SDC: returned instances are not of type specific subclass Signed-off-by: Heidi Eckhart diff -r 86999a1e8fac -r 733f1e73fe50 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Dec 12 17:22:06 2007 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Dec 13 12:04:44 2007 +0100 @@ -658,6 +658,7 @@ static CMPIInstance *sdc_rasd_inst(const struct sdc_rasd_prop *prop_list; int i; char *inst_id; + char *base = NULL; uint16_t resource_type; /* Defaults for the following are from CIM_SettingsDefineCapabilities.mof. */ @@ -704,9 +705,29 @@ static CMPIInstance *sdc_rasd_inst(const if (s->rc != CMPI_RC_OK) goto out; + switch(rasd->resource_type) { + case CIM_RASD_TYPE_MEM: + base = "MemResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_PROC: + base = "ProcResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_NET: + base = "NetResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_DISK: + base = "DiskResourceAllocationSettingData"; + break; + default: + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Resource type not known"); + goto err; + } + inst = get_typed_instance(broker, CLASSNAME(ref), - "ResourceAllocationSettingData", + base, NAMESPACE(ref)); CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars); @@ -723,6 +744,7 @@ static CMPIInstance *sdc_rasd_inst(const prop_list[i].value, prop_list[i].type); } + err: CU_DEBUG("freeing prop_list"); free_rasd_prop_list(prop_list); out: From heidieck at linux.vnet.ibm.com Thu Dec 13 10:05:12 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 13 Dec 2007 12:05:12 +0200 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK In-Reply-To: Message-ID: <346a3df2e978f42fc44e.1197543912@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197543894 -3600 # Node ID 346a3df2e978f42fc44e89c2d60e685befdda5ff # Parent 733f1e73fe50ea102d9c8942e3dfb0bbca2e6f91 SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK Signed-off-by: Heidi Eckhart diff -r 733f1e73fe50 -r 346a3df2e978 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Thu Dec 13 12:04:44 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Dec 13 12:04:54 2007 +0100 @@ -836,8 +836,8 @@ static CMPIStatus rasd_to_alloc_cap(cons struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s = {CMPI_RC_OK}; - + CMPIStatus s = {CMPI_RC_ERR_NOT_SUPPORTED}; + /* This direction of the association currently not supported. */ return s; From heidieck at linux.vnet.ibm.com Thu Dec 13 11:17:23 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 13 Dec 2007 12:17:23 +0100 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: <475ED863.3040707@linux.vnet.ibm.com> References: <838bd46416cc73ddf67e.1197378649@localhost.localdomain> <475ED10B.40601@linux.vnet.ibm.com> <475ED863.3040707@linux.vnet.ibm.com> Message-ID: <476114C3.6050100@linux.vnet.ibm.com> Jay Gagnon wrote: > Kaitlin Rupert wrote: > >> Heidi Eckhart wrote: >> >>> + if (base) >>> + inst = get_typed_instance(broker, >>> + CLASSNAME(ref), >>> + base, >>> + NAMESPACE(ref)); >>> CMSetProperty(inst, "InstanceID", inst_id, >>> CMPI_chars); >>> CMSetProperty(inst, "PropertyPolicy", &policy, CMPI_uint16); >>> >>> >> Should there be an else statement here? If the if statement fails, >> then an instance isn't created. CMSetProperty() would be trying to >> get the value of a NULL inst, which would most likely fail. >> >> > Seems like a good idea to me. Just something simple that sets status as > appropriate and bails is all that should be necessary there. Thanks for this very good catch :). I have added a default phrase to the switch statement for resource_type, that returns an error in case of an unknown resource type and exits right afterwards. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Thu Dec 13 11:23:26 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 13 Dec 2007 12:23:26 +0100 Subject: [Libvirt-cim] Failing query of AllocationCapabilities, GetInstance() does not return an instance In-Reply-To: References: Message-ID: <4761162E.2020903@linux.vnet.ibm.com> Guo Lian Yun wrote: > > The result of ein AllocationCapabilites is correct: > > wbemcli ein > http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities > localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" > localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="MemoryPool/0" > localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="DiskPool/foo" > localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/xenbr0" > localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/virbr0" > > But failing qurey of gi AllocationCapabilities: > wbemcli gi > http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" > * > * wbemcli: Cim: (1) CIM_ERR_FAILED: A general error occurred that is > not covered by a more specific error code: "Could not get ResourceType." > * > Hi Daisy, this issue was fixed by Kaitlin some days ago :) and is part of the code base since tuesday. So I guess your code is a bit older ? Please can you check out and reinstall the providers. Then this problem should be fixed. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From grendel at linux.vnet.ibm.com Thu Dec 13 14:57:32 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 13 Dec 2007 09:57:32 -0500 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <0b30c3a70c3aa076d8aa.1197540671@localhost.localdomain> References: <0b30c3a70c3aa076d8aa.1197540671@localhost.localdomain> Message-ID: <4761485C.6020007@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1197540659 -3600 > # Node ID 0b30c3a70c3aa076d8aac5a6cf63af06413b056c > # Parent b5847180d00719ff39f2d451d4e79d4369952ad5 > [CU] Merge do_ref() and do_assoc() > > The two functions do_ref() and do_assoc() run through > the same logic. The only difference are the returned > instances. By configuring the do_assoc() function with > an additional paramter (ref_rslt) to inidcate the type > of the returned instance(s) - either reference(names) or > associator(names) - the two functions can be merged. > Signed-off-by: Heidi Eckhart > > > Time for me to play PCO. This is #2, correct? And the changes since the original are limited to cleaning up the logic in the new function and breaking some stuff out into helper functions, as Dan suggested? It looks much nicer this way. Good patch codewise, sorry I've got to be a pain about the guidelines. :) -- -Jay From danms at us.ibm.com Thu Dec 13 15:02:11 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Dec 2007 07:02:11 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <4761485C.6020007@linux.vnet.ibm.com> (Jay Gagnon's message of "Thu, 13 Dec 2007 09:57:32 -0500") References: <0b30c3a70c3aa076d8aa.1197540671@localhost.localdomain> <4761485C.6020007@linux.vnet.ibm.com> Message-ID: <873au6skng.fsf@theine.beaverton.ibm.com> JG> This is #2, correct? Ah, this is a good point. I didn't notice that this was a re-send of the patch right off, because it threaded in with everything else :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Thu Dec 13 15:13:42 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 13 Dec 2007 10:13:42 -0500 Subject: [Libvirt-cim] [PATCH] In-Reply-To: <8761c7b39ea87feb54f8.1197410883@elm3b41.beaverton.ibm.com> References: <8761c7b39ea87feb54f8.1197410883@elm3b41.beaverton.ibm.com> Message-ID: <47614C26.6050907@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1197410852 28800 > # Node ID 8761c7b39ea87feb54f89e41e1a7044104ec9399 > # Parent 6c3ca59055416d7bb07716d3a750800e6087878e > #2 GetInstance() does not return an instance that matches the instanceID given. > > Updates - removed boolean and now use a string, get instanceID in GetInstance() call instead. > > Add a argument to return_ele_cap() that handles the GetInstance(). If this argument is set, get the InstanceID from the ref. In the loop that walks through the domains on the system, check to see if this id matches one of the names returned. If there is a match, create the instance and then exit from the loop. > > If no match is found, an error is returned. > > Failing query: > wbemcli gi http://localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities.InstanceID="kaitlin_test" > > localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities.InstanceID="kaitlin_test" Caption,Description,InstanceID="hd_domain",ElementName,ElementNameEditSupported=FALSE,MaxElementNameLen,RequestedStatesSupported=2,3,9,10,11,ElementNameMask,StateAwareness,CreationClassName="Xen_EnabledLogicalElementCapabilities" > > Signed-off-by: Kaitlin Rupert > > Good patch and all, but it looks like something about your commit message is making it treat the "#2 GetInstance()..." as a comment, hence the blank subject line. Ah. I just looked back at our other "#foo" patches, and it looks like they have all been patchsets or [RFC] type patches, so no actual patch (until this one) has had its commit message start with the pound sign. I guess we'll have to revise the guidelines a little. Any suggestions? -- -Jay From kaitlin at linux.vnet.ibm.com Thu Dec 13 15:37:50 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Dec 2007 07:37:50 -0800 Subject: [Libvirt-cim] Failing query of AllocationCapabilities, GetInstance() does not return an instance In-Reply-To: <4761162E.2020903@linux.vnet.ibm.com> References: <4761162E.2020903@linux.vnet.ibm.com> Message-ID: <476151CE.7090805@linux.vnet.ibm.com> Heidi Eckhart wrote: > Guo Lian Yun wrote: >> >> The result of ein AllocationCapabilites is correct: >> >> wbemcli ein >> http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities >> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" >> >> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="MemoryPool/0" >> >> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="DiskPool/foo" >> >> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/xenbr0" >> >> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/virbr0" >> >> >> But failing qurey of gi AllocationCapabilities: >> wbemcli gi >> http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" >> >> * >> * wbemcli: Cim: (1) CIM_ERR_FAILED: A general error occurred that is >> not covered by a more specific error code: "Could not get ResourceType." >> * >> > Hi Daisy, > this issue was fixed by Kaitlin some days ago :) and is part of the > code base since tuesday. So I guess your code is a bit older ? Please > can you check out and reinstall the providers. Then this problem > should be fixed. > This query is failing for me too. I fixed a similar issue with ELEC, which might be what you're thinking of. =) Thanks for finding this Daisy! I'll take a look at the problem today. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Dec 13 15:40:45 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Dec 2007 07:40:45 -0800 Subject: [Libvirt-cim] [PATCH] In-Reply-To: <47614C26.6050907@linux.vnet.ibm.com> References: <8761c7b39ea87feb54f8.1197410883@elm3b41.beaverton.ibm.com> <47614C26.6050907@linux.vnet.ibm.com> Message-ID: <4761527D.9000101@linux.vnet.ibm.com> Jay Gagnon wrote: > Kaitlin Rupert wrote: > >> # HG changeset patch >> # User Kaitlin Rupert >> # Date 1197410852 28800 >> # Node ID 8761c7b39ea87feb54f89e41e1a7044104ec9399 >> # Parent 6c3ca59055416d7bb07716d3a750800e6087878e >> #2 GetInstance() does not return an instance that matches the instanceID given. >> > > Good patch and all, but it looks like something about your commit > message is making it treat the "#2 GetInstance()..." as a comment, hence > the blank subject line. > > Ah. I just looked back at our other "#foo" patches, and it looks like > they have all been patchsets or [RFC] type patches, so no actual patch > (until this one) has had its commit message start with the pound sign. > I guess we'll have to revise the guidelines a little. Any suggestions? > I was confused too when I saw the mail send without a subject. =) Dan suggested including a space before the pound sign. I'm not sure if that will work, but I can try next time I have to resubmit a patch. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Dec 13 16:08:39 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Dec 2007 08:08:39 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <4761485C.6020007@linux.vnet.ibm.com> References: <0b30c3a70c3aa076d8aa.1197540671@localhost.localdomain> <4761485C.6020007@linux.vnet.ibm.com> Message-ID: <47615907.30403@linux.vnet.ibm.com> Jay Gagnon wrote: > Heidi Eckhart wrote: > >> # HG changeset patch >> # User Heidi Eckhart >> # Date 1197540659 -3600 >> # Node ID 0b30c3a70c3aa076d8aac5a6cf63af06413b056c >> # Parent b5847180d00719ff39f2d451d4e79d4369952ad5 >> [CU] Merge do_ref() and do_assoc() >> > Time for me to play PCO. This is #2, correct? And the changes since > the original are limited to cleaning up the logic in the new function > and breaking some stuff out into helper functions, as Dan suggested? It > looks much nicer this way. Good patch codewise, sorry I've got to be a > pain about the guidelines. :) > > Besides the patch compliance issues, my read through and quick testing looked good. =) +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Dec 13 16:20:46 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Dec 2007 08:20:46 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 - SDC: Fixed type of returned instance and error code In-Reply-To: References: Message-ID: <47615BDE.8000403@linux.vnet.ibm.com> Heidi Eckhart wrote: > Patch 1: The returned RASD instances have been of the general classname ResourceAllocationSettingData instead of the type specific one, e.g. ProcResourceAllocationSettingData > Patch 2: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK > > Diff to #1: > patch 1: fixed missing check for unknown resource type > Excellent! I like this change. =) And the set tested just fine. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Thu Dec 13 17:05:10 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Dec 2007 09:05:10 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: <733f1e73fe50ea102d9c.1197543911@localhost.localdomain> (Heidi Eckhart's message of "Thu, 13 Dec 2007 12:05:11 +0200") References: <733f1e73fe50ea102d9c.1197543911@localhost.localdomain> Message-ID: <87y7byr0e1.fsf@theine.beaverton.ibm.com> HE> + char *base = NULL; This should be a const char *. HE> + switch(rasd->resource_type) { HE> + case CIM_RASD_TYPE_MEM: HE> + base = "MemResourceAllocationSettingData"; HE> + break; HE> + case CIM_RASD_TYPE_PROC: HE> + base = "ProcResourceAllocationSettingData"; HE> + break; HE> + case CIM_RASD_TYPE_NET: HE> + base = "NetResourceAllocationSettingData"; HE> + break; HE> + case CIM_RASD_TYPE_DISK: HE> + base = "DiskResourceAllocationSettingData"; HE> + break; HE> + default: HE> + cu_statusf(broker, s, HE> + CMPI_RC_ERR_FAILED, HE> + "Resource type not known"); HE> + goto err; HE> + } HE> + Maybe this should be a helper function exposed in Virt_RASD.h, instead of buried in SDC? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Thu Dec 13 17:06:34 2007 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Dec 2007 09:06:34 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK In-Reply-To: <346a3df2e978f42fc44e.1197543912@localhost.localdomain> (Heidi Eckhart's message of "Thu, 13 Dec 2007 12:05:12 +0200") References: <346a3df2e978f42fc44e.1197543912@localhost.localdomain> Message-ID: <87tzmmr0bp.fsf@theine.beaverton.ibm.com> HE> - CMPIStatus s = {CMPI_RC_OK}; HE> - HE> + CMPIStatus s = {CMPI_RC_ERR_NOT_SUPPORTED}; HE> + HE> /* This direction of the association currently not supported. */ Not that it's a big deal or anything, but we do have RETURN_UNSUPPORTED() in libcmpiutil for this scenario. If you like it and want to re-spin the patch with it, that would be cool. Your call... :) Sorry I didn't get to reviewing this set until the second round... -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From yunguol at cn.ibm.com Fri Dec 14 08:41:08 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 14 Dec 2007 16:41:08 +0800 Subject: [Libvirt-cim] Failing query of gi of Xen_VirtualSystemMigrationCapabilities and Xen_VirtualSystemMigrationService in sfcb Message-ID: Hi, I can get excepted results by ein Xen_VirtualSystemMigrationCapabilities and Xen_VirtualSystemMigrationService in sfcb: wbemcli ein http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities.InstanceID="MigrationCapabilities" wbemcli ein http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigrationService localhost:5988/root/virt:Xen_VirtualSystemMigrationService.SystemCreationClassName="",SystemName="",CreationClassName="Xen_VirtualSystemMigrationService",Name="MigrationService" But the query of gi of them are failing as followings: wbemcli gi http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities.InstanceID= "MigrationCapabilities" * * wbemcli: Http Exception: server returned nothing (no headers, no data) * wbemcli gi http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigrationService.CreationClassName= "Xen_VirtualSystemMigrationService",Name="MigrationService",SystemCreationClassName="",SystemName="" * * wbemcli: Cim: (1) CIM_ERR_FAILED: *** Provider Virt_VSMigrationService(17139) exiting due to a SIGSEGV signal * However, whatever ein or gi, the test results are correct in Pegasus, below is the test report: wbemcli ein http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities.InstanceID="MigrationCapabilities" wbemcli ein http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigraktionService localhost:5988/root/virt:Xen_VirtualSystemMigrationService.CreationClassName="Xen_VirtualSystemMigrationService",Name="MigrationService",SystemCreationClassName="",SystemName="" wbemcli gi http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities.InstanceID= "MigrationCapabilities" localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities.InstanceID="MigrationCapabilities" Caption,Description,InstanceID="MigrationCapabilities",ElementName,DestinationHostFormatsSupported,SynchronousMethodsSupported,AsynchronousMethodsSupported,CreationClassName="Xen_VirtualSystemMigrationCapabilities" wbemcli gi http://root:password at localhost:5988/root/virt:Xen_VirtualSystemMigrationService.CreationClassName= "Xen_VirtualSystemMigrationService",Name="MigrationService",SystemCreationClassName="",SystemName="" localhost:5988/root/virt:Xen_VirtualSystemMigrationService.CreationClassName="Xen_VirtualSystemMigrationService",Name="MigrationService",SystemCreationClassName="",SystemName="" Caption,Description,ElementName,InstallDate,OperationalStatus,StatusDescriptions,Status,HealthState,PrimaryStatus,DetailedStatus,OperatingStatus,CommunicationStatus,EnabledState=5,OtherEnabledState,RequestedState=12,EnabledDefault=2,TimeOfLastStateChange,AvailableRequestedStates,TransitioningToState=12,SystemCreationClassName,SystemName,CreationClassName="Xen_VirtualSystemMigrationService",Name="MigrationService",PrimaryOwnerName,PrimaryOwnerContact,StartMode,Started Kaitlin said the fix of NULL key value has been in her list. Does the failure related with the NULL value of some keys, then why it can be test successfully on Pegasus? Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From heidieck at linux.vnet.ibm.com Fri Dec 14 08:50:30 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 09:50:30 +0100 Subject: [Libvirt-cim] [PATCH] [CU] Merge do_ref() and do_assoc() In-Reply-To: <4761485C.6020007@linux.vnet.ibm.com> References: <0b30c3a70c3aa076d8aa.1197540671@localhost.localdomain> <4761485C.6020007@linux.vnet.ibm.com> Message-ID: <476243D6.8000607@linux.vnet.ibm.com> Jay Gagnon wrote: > Heidi Eckhart wrote: > >> # HG changeset patch >> # User Heidi Eckhart >> # Date 1197540659 -3600 >> # Node ID 0b30c3a70c3aa076d8aac5a6cf63af06413b056c >> # Parent b5847180d00719ff39f2d451d4e79d4369952ad5 >> [CU] Merge do_ref() and do_assoc() >> >> The two functions do_ref() and do_assoc() run through >> the same logic. The only difference are the returned >> instances. By configuring the do_assoc() function with >> an additional paramter (ref_rslt) to inidcate the type >> of the returned instance(s) - either reference(names) or >> associator(names) - the two functions can be merged. >> Signed-off-by: Heidi Eckhart >> > Time for me to play PCO. This is #2, correct? Oops - yes, absolutely. I forgot to update the header. Thank you for making us aware of it :). I will take more care next time. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Fri Dec 14 08:56:58 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 09:56:58 +0100 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK In-Reply-To: <87tzmmr0bp.fsf@theine.beaverton.ibm.com> References: <346a3df2e978f42fc44e.1197543912@localhost.localdomain> <87tzmmr0bp.fsf@theine.beaverton.ibm.com> Message-ID: <4762455A.3050104@linux.vnet.ibm.com> Dan Smith wrote: > HE> - CMPIStatus s = {CMPI_RC_OK}; > HE> - > HE> + CMPIStatus s = {CMPI_RC_ERR_NOT_SUPPORTED}; > HE> + > HE> /* This direction of the association currently not supported. */ > > Not that it's a big deal or anything, but we do have > RETURN_UNSUPPORTED() in libcmpiutil for this scenario. Sure, thanks for reminding me :). That's much better than setting the status by hand. Good catch. I will update the patch and resend with the changes of patch #1. > If you like it > and want to re-spin the patch with it, that would be cool. Your > call... :) > > Sorry I didn't get to reviewing this set until the second round... Nop. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Fri Dec 14 08:59:42 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 09:59:42 +0100 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: <87y7byr0e1.fsf@theine.beaverton.ibm.com> References: <733f1e73fe50ea102d9c.1197543911@localhost.localdomain> <87y7byr0e1.fsf@theine.beaverton.ibm.com> Message-ID: <476245FE.5060905@linux.vnet.ibm.com> Dan Smith wrote: > HE> + char *base = NULL; > > This should be a const char *. > Good catch. > HE> + switch(rasd->resource_type) { > HE> + case CIM_RASD_TYPE_MEM: > HE> + base = "MemResourceAllocationSettingData"; > HE> + break; > HE> + case CIM_RASD_TYPE_PROC: > HE> + base = "ProcResourceAllocationSettingData"; > HE> + break; > HE> + case CIM_RASD_TYPE_NET: > HE> + base = "NetResourceAllocationSettingData"; > HE> + break; > HE> + case CIM_RASD_TYPE_DISK: > HE> + base = "DiskResourceAllocationSettingData"; > HE> + break; > HE> + default: > HE> + cu_statusf(broker, s, > HE> + CMPI_RC_ERR_FAILED, > HE> + "Resource type not known"); > HE> + goto err; > HE> + } > HE> + > > Maybe this should be a helper function exposed in Virt_RASD.h, instead > of buried in SDC? A very good idea. I also did not like the length this function got due to this change and putting it into a helper of RASD makes much more sense. I will update the patch and resend it. Thanks. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Fri Dec 14 08:40:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 10:40:03 +0200 Subject: [Libvirt-cim] [PATCH 3 of 3] SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK In-Reply-To: Message-ID: <26266b51af6a2e435dc7.1197625203@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197625021 -3600 # Node ID 26266b51af6a2e435dc7e5aad6df89df4cf23db9 # Parent fed85a12807e46622ffea62938173db4b56706a4 SDC: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK Signed-off-by: Heidi Eckhart diff -r fed85a12807e -r 26266b51af6a src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Fri Dec 14 10:36:59 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Dec 14 10:37:01 2007 +0100 @@ -824,11 +824,7 @@ static CMPIStatus rasd_to_alloc_cap(cons struct std_assoc_info *info, struct inst_list *list) { - CMPIStatus s = {CMPI_RC_OK}; - - /* This direction of the association currently not supported. */ - - return s; + RETURN_UNSUPPORTED(); } LIBVIRT_CIM_DEFAULT_MAKEREF() From heidieck at linux.vnet.ibm.com Fri Dec 14 08:40:00 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 10:40:00 +0200 Subject: [Libvirt-cim] [PATCH 0 of 3] #3 - SDC: Fixed type of returned instance and error code Message-ID: Patch 1: The returned RASD instances have been of the general classname ResourceAllocationSettingData instead of the type specific one, e.g. ProcResourceAllocationSettingData Patch 2: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK Diff to #1: patch 1: fixed missing check for unknown resource type Diff to #2: - added helper function to RASD that translates the resource type into the classname (patch 1 of 3) - updated patch 2 (#1 before) to make use of the helper function - updated patch 3 (#2 before) to make use of RETURN_UNSUPPORTED macro From heidieck at linux.vnet.ibm.com Fri Dec 14 08:40:01 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 10:40:01 +0200 Subject: [Libvirt-cim] [PATCH 1 of 3] RASD: Added helper function to check for the given resource type In-Reply-To: Message-ID: <1e73930c047813c85341.1197625201@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197624963 -3600 # Node ID 1e73930c047813c85341f2c2be32903c466cc336 # Parent 86999a1e8fac6f6cee5ca62a4005ca37759713ff RASD: Added helper function to check for the given resource type Signed-off-by: Heidi Eckhart diff -r 86999a1e8fac -r 1e73930c0478 src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Dec 12 17:22:06 2007 -0800 +++ b/src/Virt_RASD.c Fri Dec 14 10:36:03 2007 +0100 @@ -239,6 +239,30 @@ CMPIrc rasd_type_from_classname(const ch return rc; } +CMPIrc rasd_classname_from_type(uint16_t type, const char **classname) +{ + CMPIrc rc = CMPI_RC_OK; + + switch(type) { + case CIM_RASD_TYPE_MEM: + *classname = "MemResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_PROC: + *classname = "ProcResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_NET: + *classname = "NetResourceAllocationSettingData"; + break; + case CIM_RASD_TYPE_DISK: + *classname = "DiskResourceAllocationSettingData"; + break; + default: + rc = CMPI_RC_ERR_FAILED; + } + + return rc; +} + static CMPIStatus GetInstance(CMPIInstanceMI *self, const CMPIContext *context, const CMPIResult *results, diff -r 86999a1e8fac -r 1e73930c0478 src/Virt_RASD.h --- a/src/Virt_RASD.h Wed Dec 12 17:22:06 2007 -0800 +++ b/src/Virt_RASD.h Fri Dec 14 10:36:03 2007 +0100 @@ -40,6 +40,7 @@ int rasds_for_domain(const CMPIBroker *b struct inst_list *_list); CMPIrc rasd_type_from_classname(const char *cn, uint16_t *type); +CMPIrc rasd_classname_from_type(uint16_t type, const char **cn); CMPIInstance *get_rasd_instance(const CMPIContext *context, const CMPIObjectPath *ref, From heidieck at linux.vnet.ibm.com Fri Dec 14 08:40:02 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 10:40:02 +0200 Subject: [Libvirt-cim] [PATCH 2 of 3] SDC: returned instances are not of type specific subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1197625019 -3600 # Node ID fed85a12807e46622ffea62938173db4b56706a4 # Parent 1e73930c047813c85341f2c2be32903c466cc336 SDC: returned instances are not of type specific subclass Signed-off-by: Heidi Eckhart diff -r 1e73930c0478 -r fed85a12807e src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Fri Dec 14 10:36:03 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Dec 14 10:36:59 2007 +0100 @@ -42,6 +42,7 @@ #include "Virt_SettingsDefineCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_RASD.h" const static CMPIBroker *_BROKER; @@ -658,6 +659,7 @@ static CMPIInstance *sdc_rasd_inst(const struct sdc_rasd_prop *prop_list; int i; char *inst_id; + const char *base = NULL; uint16_t resource_type; /* Defaults for the following are from CIM_SettingsDefineCapabilities.mof. */ @@ -704,9 +706,16 @@ static CMPIInstance *sdc_rasd_inst(const if (s->rc != CMPI_RC_OK) goto out; + if (rasd_classname_from_type(rasd->resource_type, &base) != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Resource type not known"); + goto err; + } + inst = get_typed_instance(broker, CLASSNAME(ref), - "ResourceAllocationSettingData", + base, NAMESPACE(ref)); CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars); @@ -723,6 +732,7 @@ static CMPIInstance *sdc_rasd_inst(const prop_list[i].value, prop_list[i].type); } + err: CU_DEBUG("freeing prop_list"); free_rasd_prop_list(prop_list); out: From heidieck at linux.vnet.ibm.com Fri Dec 14 09:50:43 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Fri, 14 Dec 2007 10:50:43 +0100 Subject: [Libvirt-cim] Failing query of AllocationCapabilities, GetInstance() does not return an instance In-Reply-To: <476151CE.7090805@linux.vnet.ibm.com> References: <4761162E.2020903@linux.vnet.ibm.com> <476151CE.7090805@linux.vnet.ibm.com> Message-ID: <476251F3.2020401@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Heidi Eckhart wrote: >> Guo Lian Yun wrote: >>> >>> The result of ein AllocationCapabilites is correct: >>> >>> wbemcli ein >>> http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities >>> >>> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" >>> >>> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="MemoryPool/0" >>> >>> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="DiskPool/foo" >>> >>> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/xenbr0" >>> >>> localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="NetworkPool/virbr0" >>> >>> >>> But failing qurey of gi AllocationCapabilities: >>> wbemcli gi >>> http://root:password at localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" >>> >>> * >>> * wbemcli: Cim: (1) CIM_ERR_FAILED: A general error occurred that is >>> not covered by a more specific error code: "Could not get >>> ResourceType." >>> * >>> >> Hi Daisy, >> this issue was fixed by Kaitlin some days ago :) and is part of the >> code base since tuesday. So I guess your code is a bit older ? Please >> can you check out and reinstall the providers. Then this problem >> should be fixed. >> > This query is failing for me too. I fixed a similar issue with ELEC, > which might be what you're thinking of. =) Thanks for finding this > Daisy! I'll take a look at the problem today. > Sorry for my wrong respond. I've tested and its also failing for me. Thanks Daisy for finding this issue :). -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From danms at us.ibm.com Fri Dec 14 14:42:59 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 14 Dec 2007 06:42:59 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] SDC: returned instances are not of type specific subclass In-Reply-To: (Heidi Eckhart's message of "Fri, 14 Dec 2007 10:40:02 +0200") References: Message-ID: <87hcilqqvg.fsf@theine.beaverton.ibm.com> HE> + if (rasd_classname_from_type(rasd->resource_type, &base) != CMPI_RC_OK) { HE> + cu_statusf(broker, s, HE> + CMPI_RC_ERR_FAILED, HE> + "Resource type not known"); HE> + goto err; HE> + } HE> + HE> inst = get_typed_instance(broker, HE> CLASSNAME(ref), HE> - "ResourceAllocationSettingData", HE> + base, HE> NAMESPACE(ref)); HE> CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars); HE> @@ -723,6 +732,7 @@ static CMPIInstance *sdc_rasd_inst(const HE> prop_list[i].value, prop_list[i].type); HE> } HE> + err: HE> CU_DEBUG("freeing prop_list"); HE> free_rasd_prop_list(prop_list); HE> out: I didn't notice this before, but shouldn't we initialize prop_list to NULL, make sure free_rasd_prop_list() can handle NULL, and then put the free call below the out: target? There is another place in the function that looks like it jumps to out after prop_list could have been initialized. Further, it would be better to have it below out, so that additions like this one don't have to add or utilize an err: target. Heidi, I know this isn't really a part of your patch, but I think it's worth looking at while we're here. Jay, can you comment? Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Dec 14 19:07:58 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Dec 2007 11:07:58 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] SDC: returned instances are not of type specific subclass In-Reply-To: <87hcilqqvg.fsf@theine.beaverton.ibm.com> References: <87hcilqqvg.fsf@theine.beaverton.ibm.com> Message-ID: <4762D48E.1080302@linux.vnet.ibm.com> Dan Smith wrote: > I didn't notice this before, but shouldn't we initialize prop_list to > NULL, make sure free_rasd_prop_list() can handle NULL, and then put > the free call below the out: target? There is another place in the > function that looks like it jumps to out after prop_list could have > been initialized. Further, it would be better to have it below out, > so that additions like this one don't have to add or utilize an err: > target. > > Heidi, I know this isn't really a part of your patch, but I think it's > worth looking at while we're here. > > Jay, can you comment? > > Thanks! > > This seems like a reasonable request to me. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Sat Dec 15 00:14:11 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Dec 2007 16:14:11 -0800 Subject: [Libvirt-cim] [PATCH 0 of 3] Fix AC GetInstance() error Message-ID: AC GetInstance() currently returns an error. This patchset fixes that error and also cleans up some left over functions. From kaitlin at linux.vnet.ibm.com Sat Dec 15 00:14:13 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Dec 2007 16:14:13 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Clean up unneeded functions in AC In-Reply-To: Message-ID: <552b27c0e224e278d9b8.1197677653@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197677158 28800 # Node ID 552b27c0e224e278d9b8c12e39b45808667345c1 # Parent 889611ecea877bb54fad494ece56b2e7fac2b98e Clean up unneeded functions in AC. Now that GetInstance is calling alloc_cap_instances(), get_alloc_cap() and return_alloc_cap() are no longer needed. This removes the need for Virt_AllocationCapabilities.h Also clean up lengthy function calls. Signed-off-by: Kaitlin Rupert diff -r 889611ecea87 -r 552b27c0e224 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Fri Dec 14 16:05:54 2007 -0800 +++ b/src/Virt_AllocationCapabilities.c Fri Dec 14 16:05:58 2007 -0800 @@ -31,66 +31,9 @@ #include "misc_util.h" -#include "Virt_AllocationCapabilities.h" -#include "Virt_RASD.h" #include "Virt_DevicePool.h" const static CMPIBroker *_BROKER; - -CMPIStatus get_alloc_cap(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **inst) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - char *inst_id; - uint16_t type; - int ret; - - *inst = get_typed_instance(broker, - CLASSNAME(ref), - "AllocationCapabilities", - NAMESPACE(ref)); - - if (rasd_type_from_classname(CLASSNAME(ref), &type) != CMPI_RC_OK) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get ResourceType"); - goto out; - } - - ret = asprintf(&inst_id, "%hi/%s", type, "0"); - if (ret == -1) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get InstanceID"); - goto out; - } - - CMSetProperty(*inst, "InstanceID", inst_id, CMPI_chars); - CMSetProperty(*inst, "ResourceType", &type, CMPI_uint16); - - out: - return s; -} - -static CMPIStatus return_alloc_cap(const CMPIObjectPath *ref, - const CMPIResult *results, - int names_only) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *inst = NULL; - - s = get_alloc_cap(_BROKER, ref, &inst); - if (s.rc != CMPI_RC_OK) - goto out; - - if (names_only) - cu_return_instance_name(results, inst); - else - CMReturnInstance(results, inst); - out: - return s; -} static CMPIStatus ac_from_pool(const CMPIBroker *broker, const CMPIObjectPath *ref, @@ -231,7 +174,12 @@ static CMPIStatus EnumInstanceNames(CMPI const CMPIResult *results, const CMPIObjectPath *reference) { - return alloc_cap_instances(_BROKER, reference, results, true, NULL, NULL); + return alloc_cap_instances(_BROKER, + reference, + results, + true, + NULL, + NULL); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -240,7 +188,12 @@ static CMPIStatus EnumInstances(CMPIInst const CMPIObjectPath *reference, const char **properties) { - return alloc_cap_instances(_BROKER, reference, results, false, properties, NULL); + return alloc_cap_instances(_BROKER, + reference, + results, + false, + properties, + NULL); } DEFAULT_CI(); diff -r 889611ecea87 -r 552b27c0e224 src/Virt_AllocationCapabilities.h --- a/src/Virt_AllocationCapabilities.h Fri Dec 14 16:05:54 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright IBM Corp. 2007 - * - * Authors: - * Jay Gagnon - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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 - */ -CMPIStatus get_alloc_cap(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **inst); -/* - * Local Variables: - * mode: C - * c-set-style: "K&R" - * tab-width: 8 - * c-basic-offset: 8 - * indent-tabs-mode: nil - * End: - */ From kaitlin at linux.vnet.ibm.com Sat Dec 15 00:14:14 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Dec 2007 16:14:14 -0800 Subject: [Libvirt-cim] [PATCH 3 of 3] AC no longer needs libVirt_RASD In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197677598 28800 # Node ID a741d41893ec632315fe905aa07ce4568c318cd3 # Parent 552b27c0e224e278d9b8c12e39b45808667345c1 AC no longer needs libVirt_RASD. This cleans up the AC build dependencies. Signed-off-by: Kaitlin Rupert diff -r 552b27c0e224 -r a741d41893ec src/Makefile.am --- a/src/Makefile.am Fri Dec 14 16:05:58 2007 -0800 +++ b/src/Makefile.am Fri Dec 14 16:13:18 2007 -0800 @@ -2,7 +2,6 @@ SUBDIRS = tests SUBDIRS = tests noinst_HEADERS = profiles.h svpc_types.h \ - Virt_AllocationCapabilities.h \ Virt_ComputerSystem.h \ Virt_ComputerSystemIndication.h \ Virt_Device.h \ @@ -98,9 +97,9 @@ libVirt_ElementCapabilities_la_LIBADD = -lVirt_HostSystem \ -lVirt_VSMigrationCapabilities -libVirt_AllocationCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la +libVirt_AllocationCapabilities_la_DEPENDENCIES = libVirt_DevicePool.la libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c -libVirt_AllocationCapabilities_la_LIBADD = -lVirt_RASD -lVirt_DevicePool +libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c @@ -146,4 +145,5 @@ libVirt_ElementSettingData_la_LIBADD = - libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c -libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c \ No newline at end of file +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c + From kaitlin at linux.vnet.ibm.com Sat Dec 15 00:14:12 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Dec 2007 16:14:12 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error In-Reply-To: Message-ID: <889611ecea877bb54fad.1197677652@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197677154 28800 # Node ID 889611ecea877bb54fad494ece56b2e7fac2b98e # Parent 86999a1e8fac6f6cee5ca62a4005ca37759713ff AC GetInstance() fails with a "Could not get ResourceType" error. GetInstance() was calling return_alloc_cap(), which in turn called rasd_type_from_classname(). rasd_type_from_classname() is expecting the classname to be one of the supported RASD type classnames, but this doesn't match the AC classname. Instead, GetInstance() should only return an instance if the supplied InstanceID matches one of the existing instances. alloc_cap_instances() should be modified to take a InstanceID argument. Failing query: wbemcli gi 'http://localhost/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"' Signed-off-by: Kaitlin Rupert diff -r 86999a1e8fac -r 889611ecea87 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Wed Dec 12 17:22:06 2007 -0800 +++ b/src/Virt_AllocationCapabilities.c Fri Dec 14 16:05:54 2007 -0800 @@ -20,6 +20,7 @@ */ #include #include +#include #include #include @@ -131,7 +132,8 @@ static CMPIStatus alloc_cap_instances(co const CMPIObjectPath *ref, const CMPIResult *results, bool names_only, - const char **properties) + const char **properties, + const char *id) { int i; virConnectPtr conn = NULL; @@ -139,6 +141,7 @@ static CMPIStatus alloc_cap_instances(co struct inst_list alloc_cap_list; struct inst_list device_pool_list; CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *inst_id; CU_DEBUG("In alloc_cap_instances()"); @@ -165,6 +168,16 @@ static CMPIStatus alloc_cap_instances(co } for (i = 0; i < device_pool_list.cur; i++) { + if (cu_get_str_prop(device_pool_list.list[i], + "InstanceID", &inst_id) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Error fetching device pool InstanceID"); + goto out; + } + if (id && (!STREQ(inst_id, id))) + continue; + s = ac_from_pool(broker, ref, device_pool_list.list[i], &alloc_cap_inst); @@ -172,6 +185,9 @@ static CMPIStatus alloc_cap_instances(co goto out; inst_list_add(&alloc_cap_list, alloc_cap_inst); + + if (id && (STREQ(inst_id, id))) + break; } if (names_only) @@ -192,7 +208,22 @@ static CMPIStatus GetInstance(CMPIInstan const CMPIObjectPath *reference, const char **properties) { - return return_alloc_cap(reference, results, 0); + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char* id; + + if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "No InstanceID specified"); + return s; + } + + return alloc_cap_instances(_BROKER, + reference, + results, + false, + properties, + id); } static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, @@ -200,7 +231,7 @@ static CMPIStatus EnumInstanceNames(CMPI const CMPIResult *results, const CMPIObjectPath *reference) { - return alloc_cap_instances(_BROKER, reference, results, true, NULL); + return alloc_cap_instances(_BROKER, reference, results, true, NULL, NULL); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -209,7 +240,7 @@ static CMPIStatus EnumInstances(CMPIInst const CMPIObjectPath *reference, const char **properties) { - return alloc_cap_instances(_BROKER, reference, results, false, properties); + return alloc_cap_instances(_BROKER, reference, results, false, properties, NULL); } DEFAULT_CI(); From kaitlin at linux.vnet.ibm.com Sat Dec 15 00:09:06 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Dec 2007 16:09:06 -0800 Subject: [Libvirt-cim] [PATCH 3 of 3] AC no longer needs libVirt_RASD In-Reply-To: References: Message-ID: <47631B22.5030108@linux.vnet.ibm.com> Kaitlin Rupert wrote: > libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c > > -libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c > \ No newline at end of file > +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c > + > > I'm unsure why this showed up in the diff - I didn't make any changes to this line. My apologies for the fuzz.. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Sun Dec 16 02:04:25 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 15 Dec 2007 18:04:25 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Fix VSMigrationService NULL key attributes In-Reply-To: Message-ID: <5339f01a786a287ed6f2.1197770665@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197681878 28800 # Node ID 5339f01a786a287ed6f2c49b47704fd99db6432a # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 Fix VSMigrationService NULL key attributes. The SystemCreationClassName and SystemName keys are NULL, these should be set. Signed-off-by: Kaitlin Rupert diff -r 72b93a4339e1 -r 5339f01a786a src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Fri Dec 14 10:37:01 2007 +0100 +++ b/src/Virt_VSMigrationService.c Fri Dec 14 17:24:38 2007 -0800 @@ -36,6 +36,7 @@ #include #include "Virt_VSMigrationService.h" +#include "Virt_HostSystem.h" #define CIM_JOBSTATE_STARTING 3 #define CIM_JOBSTATE_RUNNING 4 @@ -639,6 +640,12 @@ CMPIStatus get_migration_service(const C { CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *host = NULL; + const char *val = NULL; + + s = get_host_cs(broker, ref, &host); + if (s.rc != CMPI_RC_OK) + goto out; inst = get_typed_instance(broker, CLASSNAME(ref), @@ -654,8 +661,30 @@ CMPIStatus get_migration_service(const C CMSetProperty(inst, "Name", (CMPIValue *)"MigrationService", CMPI_chars); + if (cu_get_str_prop(host, "Name", &val) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get name of HostSystem"); + goto out; + } + + CMSetProperty(inst, "SystemName", + (CMPIValue *)val, CMPI_chars); + + if (cu_get_str_prop(host, "CreationClassName", &val) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get creation class of HostSystem"); + goto out; + } + + CMSetProperty(inst, "SystemCreationClassName", + (CMPIValue *)val, CMPI_chars); + + *_inst = inst; + out: return s; } From kaitlin at linux.vnet.ibm.com Sun Dec 16 02:04:24 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 15 Dec 2007 18:04:24 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Fix NULL attributes returned by VSMigrationService. Message-ID: Get the values for the SystemName and SystemCreationClassName from the host instance and set accordingly. From kaitlin at linux.vnet.ibm.com Sun Dec 16 02:04:26 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 15 Dec 2007 18:04:26 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Add libVirt_HostSystem to VSMigrationService build In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197770616 28800 # Node ID b94dd9cf174968ecd58eeba26e37fc1a06dbdc4f # Parent 5339f01a786a287ed6f2c49b47704fd99db6432a Add libVirt_HostSystem to VSMigrationService build. Signed-off-by: Kaitlin Rupert diff -r 5339f01a786a -r b94dd9cf1749 src/Makefile.am --- a/src/Makefile.am Fri Dec 14 17:24:38 2007 -0800 +++ b/src/Makefile.am Sat Dec 15 18:03:36 2007 -0800 @@ -146,4 +146,6 @@ libVirt_ElementSettingData_la_LIBADD = - libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c -libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c \ No newline at end of file +libVirt_VSMigrationService_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c +libVirt_VSMigrationService_la_LIBADD = -lVirt_HostSystem From kaitlin at linux.vnet.ibm.com Sun Dec 16 01:59:46 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 15 Dec 2007 17:59:46 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Fix VSMigrationService NULL key attributes In-Reply-To: <5339f01a786a287ed6f2.1197770665@elm3b41.beaverton.ibm.com> References: <5339f01a786a287ed6f2.1197770665@elm3b41.beaverton.ibm.com> Message-ID: <47648692.9060302@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1197681878 28800 > # Node ID 5339f01a786a287ed6f2c49b47704fd99db6432a > # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 > Fix VSMigrationService NULL key attributes. > > The SystemCreationClassName and SystemName keys are NULL, these should be set. > VirtualSystemMigrationSerive and VSMigrationService both need to get the values for these attributes in the same way. It would be possible to lump this bit of code into a function in Virt_HostSystem, but it's unlikely that the implementation specific host provider will offer such a function (since Virt_HostSystem is acting as a placeholder). Thoughts? -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From lizg at cn.ibm.com Mon Dec 17 07:36:17 2007 From: lizg at cn.ibm.com (lizg at cn.ibm.com) Date: Mon, 17 Dec 2007 15:36:17 +0800 Subject: [Libvirt-cim] [PATCH] Change method arg type in VSMS AddResourceSettings Message-ID: <69bfac6904d4d863ebf2.1197876977@zeit.cn.ibm.com> # HG changeset patch # User Zhengang Li # Date 1197876933 -28800 # Node ID 69bfac6904d4d863ebf20c88d700496790bee9a4 # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 Change method arg type in VSMS AddResourceSettings diff -r 72b93a4339e1 -r 69bfac6904d4 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Dec 14 10:37:01 2007 +0100 +++ b/src/Virt_VirtualSystemManagementService.c Mon Dec 17 15:35:33 2007 +0800 @@ -1076,7 +1076,7 @@ static struct method_handler AddResource static struct method_handler AddResourceSettings = { .name = "AddResourceSettings", .handler = add_resource_settings, - .args = {{"AffectedConfiguration", CMPI_string}, + .args = {{"AffectedConfiguration", CMPI_ref}, {"ResourceSettings", CMPI_stringA}, ARG_END } From heidieck at linux.vnet.ibm.com Mon Dec 17 08:28:48 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 17 Dec 2007 09:28:48 +0100 Subject: [Libvirt-cim] [PATCH 2 of 3] SDC: returned instances are not of type specific subclass In-Reply-To: <87hcilqqvg.fsf@theine.beaverton.ibm.com> References: <87hcilqqvg.fsf@theine.beaverton.ibm.com> Message-ID: <47663340.7020506@linux.vnet.ibm.com> Dan Smith wrote: > I didn't notice this before, but shouldn't we initialize prop_list to > NULL, make sure free_rasd_prop_list() can handle NULL, and then put > the free call below the out: target? There is another place in the > function that looks like it jumps to out after prop_list could have > been initialized. Further, it would be better to have it below out, > so that additions like this one don't have to add or utilize an err: > target. > > Heidi, I know this isn't really a part of your patch, but I think it's > worth looking at while we're here. > A very good idea ! I will prepare the patch and sent it out with the updates for this one. > Jay, can you comment? > > Thanks! > -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 17 07:49:53 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 17 Dec 2007 09:49:53 +0200 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: harden free_rasd_prop_list to handle NULL pointer In-Reply-To: Message-ID: <109fd77699732a1bc296.1197881393@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197881324 -3600 # Node ID 109fd77699732a1bc2969b93d9a799c446b3f4c0 # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 SDC: harden free_rasd_prop_list to handle NULL pointer Signed-off-by: Heidi Eckhart diff -r 72b93a4339e1 -r 109fd7769973 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Fri Dec 14 10:37:01 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Dec 17 09:48:44 2007 +0100 @@ -89,17 +89,19 @@ static bool dup_rasd_prop_list(struct sd return true; } -static bool free_rasd_prop_list(struct sdc_rasd_prop *prop_list) +static void free_rasd_prop_list(struct sdc_rasd_prop *prop_list) { int i; + + if (!prop_list) + return; for (i = 0; prop_list[i].field != NULL; i++) { free(prop_list[i].field); free(prop_list[i].value); } - + free (prop_list); - return true; } static struct sdc_rasd_prop *mem_max(const CMPIObjectPath *ref, From heidieck at linux.vnet.ibm.com Mon Dec 17 07:49:52 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 17 Dec 2007 09:49:52 +0200 Subject: [Libvirt-cim] [PATCH 0 of 2] #4 - SDC: Fixed type of returned instance and error code Message-ID: Patch 1: The returned RASD instances have been of the general classname ResourceAllocationSettingData instead of the type specific one, e.g. ProcResourceAllocationSettingData Patch 2: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK Diff to #1: patch 1: fixed missing check for unknown resource type Diff to #2: - added helper function to RASD that translates the resource type into the classname (patch 1 of 3) - updated patch 2 (#1 before) to make use of the helper function - updated patch 3 (#2 before) to make use of RETURN_UNSUPPORTED macro Diff to #3: - patch 1 and 3 are already checked in and no longer part of this patch series - added patch to harden free_rasd_prop_list() function to handle NULL pointer - patch 2 (also patch 2 before): cleaned up error handling From heidieck at linux.vnet.ibm.com Mon Dec 17 07:49:54 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 17 Dec 2007 09:49:54 +0200 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1197881325 -3600 # Node ID c22a61c0852055c920f46ffe82ab5761c7240444 # Parent 109fd77699732a1bc2969b93d9a799c446b3f4c0 SDC: returned instances are not of type specific subclass Signed-off-by: Heidi Eckhart diff -r 109fd7769973 -r c22a61c08520 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Dec 17 09:48:44 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Dec 17 09:48:45 2007 +0100 @@ -42,6 +42,7 @@ #include "Virt_SettingsDefineCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_RASD.h" const static CMPIBroker *_BROKER; @@ -657,9 +658,10 @@ static CMPIInstance *sdc_rasd_inst(const sdc_rasd_type type) { CMPIInstance *inst = NULL; - struct sdc_rasd_prop *prop_list; + struct sdc_rasd_prop *prop_list = NULL; int i; - char *inst_id; + char *inst_id = NULL; + const char *base = NULL; uint16_t resource_type; /* Defaults for the following are from CIM_SettingsDefineCapabilities.mof. */ @@ -700,15 +702,21 @@ static CMPIInstance *sdc_rasd_inst(const cu_statusf(broker, s, CMPI_RC_ERR_FAILED, "Unsupported sdc_rasd type"); - goto out; } if (s->rc != CMPI_RC_OK) goto out; + + if (rasd_classname_from_type(rasd->resource_type, &base) != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Resource type not known"); + goto out; + } inst = get_typed_instance(broker, CLASSNAME(ref), - "ResourceAllocationSettingData", + base, NAMESPACE(ref)); CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars); @@ -725,10 +733,8 @@ static CMPIInstance *sdc_rasd_inst(const prop_list[i].value, prop_list[i].type); } - CU_DEBUG("freeing prop_list"); + out: free_rasd_prop_list(prop_list); - out: - CU_DEBUG("Returning inst"); return inst; } From heidieck at linux.vnet.ibm.com Mon Dec 17 09:06:05 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 17 Dec 2007 10:06:05 +0100 Subject: [Libvirt-cim] [PATCH 0 of 3] Fix AC GetInstance() error In-Reply-To: References: Message-ID: <47663BFD.3070804@linux.vnet.ibm.com> Kaitlin Rupert wrote: > AC GetInstance() currently returns an error. This patchset fixes that error and also cleans up some left over functions. > > This fix works perfectly for me. Great :). The only problem I encountered was with a non existing instance, e.g. a typo in the InstanceID as below. Therefore the provider segfaults. Please can you have a look into this ? Thanks. wbemcli gi 'http://localhost/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPol/0"' -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 17 09:24:46 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 17 Dec 2007 10:24:46 +0100 Subject: [Libvirt-cim] [PATCH 2 of 2] Add libVirt_HostSystem to VSMigrationService build In-Reply-To: References: Message-ID: <4766405E.4050702@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1197770616 28800 > # Node ID b94dd9cf174968ecd58eeba26e37fc1a06dbdc4f > # Parent 5339f01a786a287ed6f2c49b47704fd99db6432a > Add libVirt_HostSystem to VSMigrationService build. > > Signed-off-by: Kaitlin Rupert > > diff -r 5339f01a786a -r b94dd9cf1749 src/Makefile.am > --- a/src/Makefile.am Fri Dec 14 17:24:38 2007 -0800 > +++ b/src/Makefile.am Sat Dec 15 18:03:36 2007 -0800 > @@ -146,4 +146,6 @@ libVirt_ElementSettingData_la_LIBADD = - > > libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c > > -libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c > \ No newline at end of file > +libVirt_VSMigrationService_la_DEPENDENCIES = libVirt_HostSystem.la > +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c > +libVirt_VSMigrationService_la_LIBADD = -lVirt_HostSystem > > Applying this patch crashes, if "[PATCH 3 of 3] AC no longer needs libVirt_RASD" was applied before. I suppose the reason is that the "\ No newline at end of file" was already fixed by the patch before. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Mon Dec 17 09:25:32 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Mon, 17 Dec 2007 10:25:32 +0100 Subject: [Libvirt-cim] [PATCH 0 of 2] Fix NULL attributes returned by VSMigrationService. In-Reply-To: References: Message-ID: <4766408C.5000801@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Get the values for the SystemName and SystemCreationClassName from the host instance and set accordingly. > > Besides the minor problem with applying the changes to the makefile, this works perfectly for me. Great work :). +1 -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From danms at us.ibm.com Mon Dec 17 16:08:17 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 17 Dec 2007 08:08:17 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Fix VSMigrationService NULL key attributes In-Reply-To: <47648692.9060302@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Sat, 15 Dec 2007 17:59:46 -0800") References: <5339f01a786a287ed6f2.1197770665@elm3b41.beaverton.ibm.com> <47648692.9060302@linux.vnet.ibm.com> Message-ID: <87tzmhpamm.fsf@theine.beaverton.ibm.com> KR> VirtualSystemMigrationSerive and VSMigrationService both need to KR> get the values for these attributes in the same way. It would be KR> possible to lump this bit of code into a function in KR> Virt_HostSystem, but it's unlikely that the implementation KR> specific host provider will offer such a function (since KR> Virt_HostSystem is acting as a placeholder). My plan was never to remove the placeholder, but rather to modify the placeholder with logic to look up and return the proper host system. This would give us a control point for switching between host instrumentation, with the option to keep our fake one if nothing else is available. Adding such a function seems like a good idea to me, and as long as it uses the existing internal logic in HostSystem to get the information, it shouldn't need to change later. Shall I hold off on this set or apply and let you add the generalized function first? Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Mon Dec 17 16:09:27 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 17 Dec 2007 11:09:27 -0500 Subject: [Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error In-Reply-To: <889611ecea877bb54fad.1197677652@elm3b41.beaverton.ibm.com> References: <889611ecea877bb54fad.1197677652@elm3b41.beaverton.ibm.com> Message-ID: <47669F37.3050902@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1197677154 28800 > # Node ID 889611ecea877bb54fad494ece56b2e7fac2b98e > # Parent 86999a1e8fac6f6cee5ca62a4005ca37759713ff > AC GetInstance() fails with a "Could not get ResourceType" error. > > GetInstance() was calling return_alloc_cap(), which in turn called rasd_type_from_classname(). rasd_type_from_classname() is expecting the classname to be one of the supported RASD type classnames, but this doesn't match the AC classname. > > Instead, GetInstance() should only return an instance if the supplied InstanceID matches one of the existing instances. alloc_cap_instances() should be modified to take a InstanceID argument. > > Failing query: > wbemcli gi 'http://localhost/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"' > > Signed-off-by: Kaitlin Rupert > > const char **properties) > { > - return return_alloc_cap(reference, results, 0); > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + const char* id; > + > + if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "No InstanceID specified"); > + return s; > + } > > Just a general style thing here. Don't know if we've made it official or not but most of the time we would use a "goto out;" type thing there. Nothing big but if you need to resend to fix that segfault Heidi found this would probably be worth changing for the sake of consistency. -- -Jay From danms at us.ibm.com Mon Dec 17 16:09:24 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 17 Dec 2007 08:09:24 -0800 Subject: [Libvirt-cim] [PATCH] Change method arg type in VSMS AddResourceSettings In-Reply-To: <69bfac6904d4d863ebf2.1197876977@zeit.cn.ibm.com> (lizg@cn.ibm.com's message of "Mon, 17 Dec 2007 15:36:17 +0800") References: <69bfac6904d4d863ebf2.1197876977@zeit.cn.ibm.com> Message-ID: <87prx5pakr.fsf@theine.beaverton.ibm.com> ZL> # HG changeset patch ZL> # User Zhengang Li ZL> # Date 1197876933 -28800 ZL> # Node ID 69bfac6904d4d863ebf20c88d700496790bee9a4 ZL> # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 ZL> Change method arg type in VSMS AddResourceSettings This looks fine to me. Can you resend with your DCO sign-off? Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Mon Dec 17 16:15:39 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 17 Dec 2007 08:15:39 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: (Heidi Eckhart's message of "Mon, 17 Dec 2007 09:49:54 +0200") References: Message-ID: <87lk7tpaac.fsf@theine.beaverton.ibm.com> HE> # HG changeset patch HE> # User Heidi Eckhart HE> # Date 1197881325 -3600 HE> # Node ID c22a61c0852055c920f46ffe82ab5761c7240444 HE> # Parent 109fd77699732a1bc2969b93d9a799c446b3f4c0 HE> SDC: returned instances are not of type specific subclass This looks better, thanks a lot for making that change. However, I just noticed something else: HE> - char *inst_id; HE> + char *inst_id = NULL; inst_id should be a const char * as well. Since we're touching it here, I think we might as well fix that up. Sorry to force another iteration, but if you wouldn't mind tweaking that one thing, I promise I'll commit this set without further complaint :P Thanks Heidi! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Mon Dec 17 16:21:39 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 17 Dec 2007 11:21:39 -0500 Subject: [Libvirt-cim] [PATCH 3 of 3] AC no longer needs libVirt_RASD In-Reply-To: <47631B22.5030108@linux.vnet.ibm.com> References: <47631B22.5030108@linux.vnet.ibm.com> Message-ID: <4766A213.90904@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Kaitlin Rupert wrote: >> libVirt_VSMigrationCapabilities_la_SOURCES = >> Virt_VSMigrationCapabilities.c >> >> -libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c >> \ No newline at end of file >> +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c >> + >> >> > I'm unsure why this showed up in the diff - I didn't make any changes > to this line. My apologies for the fuzz.. > That kind of thing happens to me sometimes to, and it's very annoying cuz it's an easy mistake to make. It's entirely forgiveable though. It's officially on my (oh so secret) list of exceptions to the guidelines, because it's such a stupid thing to have to look out for. I believe it is related to how emacs does certain operations, like "delete the rest of this line" and that kind of thing. Regardless, any time a file with no newline at the end has one added, all nitpicking charges will be dropped. Removing the ending newline will not be overlooked, however, because things will be cleaner if all files always have newline at the end. Hopefully that doesn't sound as arbitrary as it feels. -- -Jay From danms at us.ibm.com Mon Dec 17 16:46:53 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 17 Dec 2007 08:46:53 -0800 Subject: [Libvirt-cim] [PATCH 3 of 3] AC no longer needs libVirt_RASD In-Reply-To: <4766A213.90904@linux.vnet.ibm.com> (Jay Gagnon's message of "Mon, 17 Dec 2007 11:21:39 -0500") References: <47631B22.5030108@linux.vnet.ibm.com> <4766A213.90904@linux.vnet.ibm.com> Message-ID: <87hcihp8ua.fsf@theine.beaverton.ibm.com> JG> Regardless, any time a file with no newline at the end has one JG> added, all nitpicking charges will be dropped. Removing the JG> ending newline will not be overlooked, however, because things JG> will be cleaner if all files always have newline at the end. Agreed. Actually, it is probably best if we try to notice when new patches don't have a newline to reduce the potential for this. I don't know about less-sophisticated editors, but in emacs, you can add this to your .emacs to ensure all files have a final newline: (setq require-final-newline t) I thought the default was to either force or ask, but maybe some people don't have this set in their environment. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Mon Dec 17 16:52:45 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 08:52:45 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error In-Reply-To: <47669F37.3050902@linux.vnet.ibm.com> References: <889611ecea877bb54fad.1197677652@elm3b41.beaverton.ibm.com> <47669F37.3050902@linux.vnet.ibm.com> Message-ID: <4766A95D.8010700@linux.vnet.ibm.com> Jay Gagnon wrote: >> + >> + if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) { >> + cu_statusf(_BROKER, &s, >> + CMPI_RC_ERR_FAILED, >> + "No InstanceID specified"); >> + return s; >> + } >> >> >> > Just a general style thing here. Don't know if we've made it official > or not but most of the time we would use a "goto out;" type thing > there. Nothing big but if you need to resend to fix that segfault Heidi > found this would probably be worth changing for the sake of consistency. > Right, good point. I didn't use "goto out" here because if we don't encounter an error, we do the following: + return alloc_cap_instances(_BROKER, + reference, + results, + false, + properties, + id); So "goto out" would just skip past this return in order to return the status. But since I need to fix this patch anyway, I can make this change as well. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Mon Dec 17 16:56:08 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 08:56:08 -0800 Subject: [Libvirt-cim] [PATCH 3 of 3] AC no longer needs libVirt_RASD In-Reply-To: <87hcihp8ua.fsf@theine.beaverton.ibm.com> References: <47631B22.5030108@linux.vnet.ibm.com> <4766A213.90904@linux.vnet.ibm.com> <87hcihp8ua.fsf@theine.beaverton.ibm.com> Message-ID: <4766AA28.5060608@linux.vnet.ibm.com> Dan Smith wrote: > JG> Regardless, any time a file with no newline at the end has one > JG> added, all nitpicking charges will be dropped. Removing the > JG> ending newline will not be overlooked, however, because things > JG> will be cleaner if all files always have newline at the end. > Thanks for the explanation. =) > Agreed. Actually, it is probably best if we try to notice when new > patches don't have a newline to reduce the potential for this. > > I don't know about less-sophisticated editors, but in emacs, you can > add this to your .emacs to ensure all files have a final newline: > > (setq require-final-newline t) > > I thought the default was to either force or ask, but maybe some > people don't have this set in their environment. > I'm using vim, and I'm not sure what the default action for this is. I'll look into it. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Mon Dec 17 16:58:25 2007 From: danms at us.ibm.com (Dan Smith) Date: Mon, 17 Dec 2007 08:58:25 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error In-Reply-To: <4766A95D.8010700@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 17 Dec 2007 08:52:45 -0800") References: <889611ecea877bb54fad.1197677652@elm3b41.beaverton.ibm.com> <47669F37.3050902@linux.vnet.ibm.com> <4766A95D.8010700@linux.vnet.ibm.com> Message-ID: <87d4t5p8b2.fsf@theine.beaverton.ibm.com> KR> Right, good point. I didn't use "goto out" here because if we don't KR> encounter an error, we do the following: Actually, I think that's a good reason to just return from where you do. I'm sure anything trying to allow the "goto out" will be ugly :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Mon Dec 17 17:00:13 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 09:00:13 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Fix VSMigrationService NULL key attributes In-Reply-To: <4766AAEC.5090505@linux.vnet.ibm.com> References: <5339f01a786a287ed6f2.1197770665@elm3b41.beaverton.ibm.com> <47648692.9060302@linux.vnet.ibm.com> <87tzmhpamm.fsf@theine.beaverton.ibm.com> <4766AAEC.5090505@linux.vnet.ibm.com> Message-ID: <4766AB1D.4030609@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Dan Smith wrote: >> My plan was never to remove the placeholder, but rather to modify the >> placeholder with logic to look up and return the proper host system. >> This would give us a control point for switching between host >> instrumentation, with the option to keep our fake one if nothing else >> is available. >> Adding such a function seems like a good idea to me, and as long as it >> uses the existing internal logic in HostSystem to get the information, >> it shouldn't need to change later. >> >> Shall I hold off on this set or apply and let you add the generalized >> function first? >> >> Thanks! >> >> Yes, I'll rework this patch. No need to have the same code in multiple places if we can avoid it. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From grendel at linux.vnet.ibm.com Mon Dec 17 17:06:46 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Mon, 17 Dec 2007 12:06:46 -0500 Subject: [Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error In-Reply-To: <87d4t5p8b2.fsf@theine.beaverton.ibm.com> References: <889611ecea877bb54fad.1197677652@elm3b41.beaverton.ibm.com> <47669F37.3050902@linux.vnet.ibm.com> <4766A95D.8010700@linux.vnet.ibm.com> <87d4t5p8b2.fsf@theine.beaverton.ibm.com> Message-ID: <4766ACA6.80806@linux.vnet.ibm.com> Dan Smith wrote: > KR> Right, good point. I didn't use "goto out" here because if we don't > KR> encounter an error, we do the following: > > Actually, I think that's a good reason to just return from where you > do. I'm sure anything trying to allow the "goto out" will be ugly :) > > Well, I'd definitely rather have "slightly different than normal" over "really ugly" here. I didn't look too hard at the surrounding code, so I didn't realize that it will get messy trying to use goto out. No worries, leave it as is. -- -Jay From kaitlin at linux.vnet.ibm.com Mon Dec 17 18:25:19 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 10:25:19 -0800 Subject: [Libvirt-cim] [PATCH 0 of 4] #2 Fix NULL attributes returned by VSMigrationService. Message-ID: Updates: Add function to Virt_HostSystem that gets the values for the Name and CreationClassName attributes of the host instance. Modify VSMgmtService so that it uses this function. Get the values for the SystemName and SystemCreationClassName from the host instance and set accordingly. From kaitlin at linux.vnet.ibm.com Mon Dec 17 18:25:21 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 10:25:21 -0800 Subject: [Libvirt-cim] [PATCH 2 of 4] Fix VSMigrationService NULL key attributes In-Reply-To: Message-ID: <77463a23a25e77b2dafc.1197915921@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197915794 28800 # Node ID 77463a23a25e77b2dafc4f0a6723366ebd6961e1 # Parent e147f8dd86aa3422d81610b5d9e659f7f5aada70 Fix VSMigrationService NULL key attributes. The SystemCreationClassName and SystemName keys are NULL, these should be set. These values can be retrieved using get_host_system_properties(). Signed-off-by: Kaitlin Rupert diff -r e147f8dd86aa -r 77463a23a25e src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Mon Dec 17 10:23:09 2007 -0800 +++ b/src/Virt_VSMigrationService.c Mon Dec 17 10:23:14 2007 -0800 @@ -36,6 +36,7 @@ #include #include "Virt_VSMigrationService.h" +#include "Virt_HostSystem.h" #define CIM_JOBSTATE_STARTING 3 #define CIM_JOBSTATE_RUNNING 4 @@ -639,6 +640,8 @@ CMPIStatus get_migration_service(const C { CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + const char *ccname = NULL; inst = get_typed_instance(broker, CLASSNAME(ref), @@ -648,14 +651,34 @@ CMPIStatus get_migration_service(const C cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "Unable to get instance for %s", CLASSNAME(ref)); - return s; + goto out; + } + + s = get_host_system_properties(&name, + &ccname, + ref, + broker); + if (s.rc != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; } CMSetProperty(inst, "Name", (CMPIValue *)"MigrationService", CMPI_chars); + CMSetProperty(inst, "SystemName", + (CMPIValue *)name, CMPI_chars); + + CMSetProperty(inst, "SystemCreationClassName", + (CMPIValue *)ccname, CMPI_chars); + + CMSetStatus(&s, CMPI_RC_OK); + *_inst = inst; + out: return s; } From kaitlin at linux.vnet.ibm.com Mon Dec 17 18:25:20 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 10:25:20 -0800 Subject: [Libvirt-cim] [PATCH 1 of 4] Add function to HostSystem that returns the host instance attribute values In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197915789 28800 # Node ID e147f8dd86aa3422d81610b5d9e659f7f5aada70 # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 Add function to HostSystem that returns the host instance attribute values. Add get_host_system_properties(const char *name, const char *ccname) which gets the Name and the CreationClassName attributes from the host instance. Signed-off-by: Kaitlin Rupert diff -r 72b93a4339e1 -r e147f8dd86aa src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Fri Dec 14 10:37:01 2007 +0100 +++ b/src/Virt_HostSystem.c Mon Dec 17 10:23:09 2007 -0800 @@ -110,6 +110,36 @@ static CMPIStatus return_host_cs(const C return s; } +CMPIStatus get_host_system_properties(const char **name, + const char **ccname, + const CMPIObjectPath *ref, + const CMPIBroker *broker) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *host = NULL; + + s = get_host_cs(broker, ref, &host); + if (s.rc != CMPI_RC_OK) + goto out; + + if (cu_get_str_prop(host, "Name", name) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get name of HostSystem"); + goto out; + } + + if (cu_get_str_prop(host, "CreationClassName", ccname) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get creation class of HostSystem"); + goto out; + } + + out: + return s; +} + static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, const CMPIContext *context, const CMPIResult *results, diff -r 72b93a4339e1 -r e147f8dd86aa src/Virt_HostSystem.h --- a/src/Virt_HostSystem.h Fri Dec 14 10:37:01 2007 +0100 +++ b/src/Virt_HostSystem.h Mon Dec 17 10:23:09 2007 -0800 @@ -25,4 +25,8 @@ CMPIStatus get_host_cs(const CMPIBroker const CMPIObjectPath *reference, CMPIInstance **instance); +CMPIStatus get_host_system_properties(const char **name, + const char **ccname, + const CMPIObjectPath *ref, + const CMPIBroker *broker); #endif From kaitlin at linux.vnet.ibm.com Mon Dec 17 18:25:22 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 10:25:22 -0800 Subject: [Libvirt-cim] [PATCH 3 of 4] Add libVirt_HostSystem to VSMigrationService build In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197681910 28800 # Node ID cec8c353e72fe13f9485afcd73afa7f4c4e76776 # Parent 77463a23a25e77b2dafc4f0a6723366ebd6961e1 Add libVirt_HostSystem to VSMigrationService build. Signed-off-by: Kaitlin Rupert diff -r 77463a23a25e -r cec8c353e72f src/Makefile.am --- a/src/Makefile.am Mon Dec 17 10:23:14 2007 -0800 +++ b/src/Makefile.am Fri Dec 14 17:25:10 2007 -0800 @@ -146,4 +146,7 @@ libVirt_ElementSettingData_la_LIBADD = - libVirt_VSMigrationCapabilities_la_SOURCES = Virt_VSMigrationCapabilities.c -libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c \ No newline at end of file +libVirt_VSMigrationService_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_VSMigrationService_la_SOURCES = Virt_VSMigrationService.c +libVirt_VSMigrationService_la_LIBADD = -lVirt_HostSystem + From kaitlin at linux.vnet.ibm.com Mon Dec 17 18:25:23 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 10:25:23 -0800 Subject: [Libvirt-cim] [PATCH 4 of 4] Use get_host_system_properties() in VSMgmtService to get attributes In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197915820 28800 # Node ID d6cf74b64c720d65da17bdac2604f7d0f1d31f7e # Parent cec8c353e72fe13f9485afcd73afa7f4c4e76776 Use get_host_system_properties() in VSMgmtService to get attributes. Use get_host_system_properties() to get the host attributes. Signed-off-by: Kaitlin Rupert diff -r cec8c353e72f -r d6cf74b64c72 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Dec 14 17:25:10 2007 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Mon Dec 17 10:23:40 2007 -0800 @@ -1125,8 +1125,8 @@ CMPIStatus get_vsms(const CMPIObjectPath { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; - CMPIInstance *host = NULL; - const char *val = NULL; + const char *name = NULL; + const char *ccname = NULL; virConnectPtr conn = NULL; *_inst = NULL; @@ -1134,10 +1134,6 @@ CMPIStatus get_vsms(const CMPIObjectPath if (conn == NULL) return s; - s = get_host_cs(broker, reference, &host); - if (s.rc != CMPI_RC_OK) - goto out; - inst = get_typed_instance(broker, pfx_from_conn(conn), "VirtualSystemManagementService", @@ -1151,28 +1147,25 @@ CMPIStatus get_vsms(const CMPIObjectPath goto out; } + s = get_host_system_properties(&name, + &ccname, + reference, + broker); + if (s.rc != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; + } + CMSetProperty(inst, "Name", (CMPIValue *)"Management Service", CMPI_chars); - if (cu_get_str_prop(host, "Name", &val) != CMPI_RC_OK) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Unable to get name of HostSystem"); - goto out; - } - CMSetProperty(inst, "SystemName", - (CMPIValue *)val, CMPI_chars); - - if (cu_get_str_prop(host, "CreationClassName", &val) != CMPI_RC_OK) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Unable to get creation class of HostSystem"); - goto out; - } + (CMPIValue *)name, CMPI_chars); CMSetProperty(inst, "SystemCreationClassName", - (CMPIValue *)val, CMPI_chars); + (CMPIValue *)ccname, CMPI_chars); CMSetStatus(&s, CMPI_RC_OK); From kaitlin at linux.vnet.ibm.com Mon Dec 17 18:46:04 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 10:46:04 -0800 Subject: [Libvirt-cim] [PATCH 0 of 3] Fix AC GetInstance() error In-Reply-To: <47663BFD.3070804@linux.vnet.ibm.com> References: <47663BFD.3070804@linux.vnet.ibm.com> Message-ID: <4766C3EC.2030200@linux.vnet.ibm.com> Heidi Eckhart wrote: > > The only problem I encountered was with a non existing instance, e.g. a > typo in the InstanceID as below. Therefore the provider segfaults. > Please can you have a look into this ? Thanks. > > wbemcli gi > 'http://localhost/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPol/0"' > > > Thanks Heidi for testing this. Are you testing on sfcb? I tested this same scenario on Pegasus (before submitting), and I got the following error: * * wbemcli: Cim: (6) CIM_ERR_NOT_FOUND: The requested object could not be found * I just tried applying these patches on a clean tree and re-testing - I get the same error. I'm testing with tog-pegasus-2.6.1-2.fc8. Has anyone else encountered a segfault or other unexpected error condition? -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Mon Dec 17 18:46:56 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 10:46:56 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error In-Reply-To: <4766ACA6.80806@linux.vnet.ibm.com> References: <889611ecea877bb54fad.1197677652@elm3b41.beaverton.ibm.com> <47669F37.3050902@linux.vnet.ibm.com> <4766A95D.8010700@linux.vnet.ibm.com> <87d4t5p8b2.fsf@theine.beaverton.ibm.com> <4766ACA6.80806@linux.vnet.ibm.com> Message-ID: <4766C420.7040908@linux.vnet.ibm.com> Jay Gagnon wrote: > Well, I'd definitely rather have "slightly different than normal" over > "really ugly" here. I didn't look too hard at the surrounding code, so > I didn't realize that it will get messy trying to use goto out. No > worries, leave it as is. > Thanks - that works for me =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From zli at linux.vnet.ibm.com Tue Dec 18 02:17:41 2007 From: zli at linux.vnet.ibm.com (Zhengang Li) Date: Tue, 18 Dec 2007 10:17:41 +0800 Subject: [Libvirt-cim] [PATCH] Change method arg type in VSMS AddResourceSettings In-Reply-To: <87prx5pakr.fsf@theine.beaverton.ibm.com> References: <69bfac6904d4d863ebf2.1197876977@zeit.cn.ibm.com> <87prx5pakr.fsf@theine.beaverton.ibm.com> Message-ID: <47672DC5.1060403@linux.vnet.ibm.com> Dan Smith wrote: > ZL> # HG changeset patch > ZL> # User Zhengang Li > ZL> # Date 1197876933 -28800 > ZL> # Node ID 69bfac6904d4d863ebf20c88d700496790bee9a4 > ZL> # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 > ZL> Change method arg type in VSMS AddResourceSettings > > This looks fine to me. Can you resend with your DCO sign-off? Ah...OK. I should have added that. > > Thanks! > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- - Zhengang From lizg at cn.ibm.com Tue Dec 18 02:19:56 2007 From: lizg at cn.ibm.com (lizg at cn.ibm.com) Date: Tue, 18 Dec 2007 10:19:56 +0800 Subject: [Libvirt-cim] [PATCH] Change method arg type in VSMS AddResourceSettings Message-ID: <58868e43ae199187436f.1197944396@zeit.cn.ibm.com> # HG changeset patch # User Zhengang Li # Date 1197944392 -28800 # Node ID 58868e43ae199187436f1709da9177e4fa0a8f3d # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 Change method arg type in VSMS AddResourceSettings Signed-off-by: Zhengang Li diff -r 72b93a4339e1 -r 58868e43ae19 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Dec 14 10:37:01 2007 +0100 +++ b/src/Virt_VirtualSystemManagementService.c Tue Dec 18 10:19:52 2007 +0800 @@ -1076,7 +1076,7 @@ static struct method_handler AddResource static struct method_handler AddResourceSettings = { .name = "AddResourceSettings", .handler = add_resource_settings, - .args = {{"AffectedConfiguration", CMPI_string}, + .args = {{"AffectedConfiguration", CMPI_ref}, {"ResourceSettings", CMPI_stringA}, ARG_END } From kaitlin at linux.vnet.ibm.com Tue Dec 18 02:55:38 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 17 Dec 2007 18:55:38 -0800 Subject: [Libvirt-cim] [PATCH] if statement in state_change() in CS expects incorrect return value Message-ID: <6f5ab2a959deeb6e13e8.1197946538@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1197946011 28800 # Node ID 6f5ab2a959deeb6e13e8f684a014bec9fda36032 # Parent 8d761c7477e78302fb7dfea2ac6d82cc58974dd5 if statement in state_change() in CS expects incorrect return value. cu_get_u16_arg() returns CMPI_RC_OK upon success. Signed-off-by: Kaitlin Rupert diff -r 8d761c7477e7 -r 6f5ab2a959de src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Fri Dec 14 16:13:18 2007 -0800 +++ b/src/Virt_ComputerSystem.c Mon Dec 17 18:46:51 2007 -0800 @@ -662,7 +662,7 @@ static CMPIStatus state_change(CMPIMetho const char *name = NULL; ret = cu_get_u16_arg(argsin, "RequestedState", &state); - if (!ret) { + if (ret != CMPI_RC_OK) { CMSetStatus(&s, CMPI_RC_ERR_INVALID_PARAMETER); goto out; } From heidieck at linux.vnet.ibm.com Tue Dec 18 08:41:53 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 09:41:53 +0100 Subject: [Libvirt-cim] [PATCH 0 of 3] Fix AC GetInstance() error In-Reply-To: <4766C3EC.2030200@linux.vnet.ibm.com> References: <47663BFD.3070804@linux.vnet.ibm.com> <4766C3EC.2030200@linux.vnet.ibm.com> Message-ID: <476787D1.6020802@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Heidi Eckhart wrote: >> >> The only problem I encountered was with a non existing instance, e.g. >> a typo in the InstanceID as below. Therefore the provider segfaults. >> Please can you have a look into this ? Thanks. >> >> wbemcli gi >> 'http://localhost/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPol/0"' >> >> >> > Thanks Heidi for testing this. Are you testing on sfcb? Yes, testing on sfcb. > I tested this same scenario on Pegasus (before submitting), and I got > the following error: > > * > * wbemcli: Cim: (6) CIM_ERR_NOT_FOUND: The requested object could not > be found > * > Well, yet another difference between Pegasus and sfcb. Pegasus seems to take the given object path, do an enumerateInstanceNames and iterate through the returned instances trying to find the requested one. This error_not_found is definitely created by Pegasus itself, while the getInstance() of our provider does not get called in this case. On the other hand sfcb directs this call to the provider (that's why he can call himself "small footprint" ;) ). > I just tried applying these patches on a clean tree and re-testing - I > get the same error. I'm testing with tog-pegasus-2.6.1-2.fc8. > > Has anyone else encountered a segfault or other unexpected error > condition? > I will have a look into it and try to find out where it segfault. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Tue Dec 18 08:55:58 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 09:55:58 +0100 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: <87lk7tpaac.fsf@theine.beaverton.ibm.com> References: <87lk7tpaac.fsf@theine.beaverton.ibm.com> Message-ID: <47678B1E.8060004@linux.vnet.ibm.com> Dan Smith wrote: > HE> # HG changeset patch > HE> # User Heidi Eckhart > HE> # Date 1197881325 -3600 > HE> # Node ID c22a61c0852055c920f46ffe82ab5761c7240444 > HE> # Parent 109fd77699732a1bc2969b93d9a799c446b3f4c0 > HE> SDC: returned instances are not of type specific subclass > > This looks better, thanks a lot for making that change. However, I > just noticed something else: > > HE> - char *inst_id; > HE> + char *inst_id = NULL; > > inst_id should be a const char * as well. Since we're touching it > here, I think we might as well fix that up. > Good catch ! I will resend the patch set. > Sorry to force another iteration, but if you wouldn't mind tweaking > that one thing, I promise I'll commit this set without further > complaint :P > :) -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Tue Dec 18 07:58:15 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 09:58:15 +0200 Subject: [Libvirt-cim] [PATCH 0 of 2] #5 - SDC: Fixed type of returned instance and error code Message-ID: Patch 1: The returned RASD instances have been of the general classname ResourceAllocationSettingData instead of the type specific one, e.g. ProcResourceAllocationSettingData Patch 2: RASD to AllocationCapabilities should return NOT_SUPPORTED instead of OK Diff to #1: patch 1: fixed missing check for unknown resource type Diff to #2: - added helper function to RASD that translates the resource type into the classname (patch 1 of 3) - updated patch 2 (#1 before) to make use of the helper function - updated patch 3 (#2 before) to make use of RETURN_UNSUPPORTED macro Diff to #3: - patch 1 and 3 are already checked in and no longer part of this patch series - added patch to harden free_rasd_prop_list() function to handle NULL pointer - patch 2 (also patch 2 before): cleaned up error handling Diff to #4: - patch 2: made inst_id a const char* From heidieck at linux.vnet.ibm.com Tue Dec 18 07:58:16 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 09:58:16 +0200 Subject: [Libvirt-cim] [PATCH 1 of 2] SDC: harden free_rasd_prop_list to handle NULL pointer In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1197967850 -3600 # Node ID fcb43d2882bc6925c41b7e451e6c41e42d430025 # Parent 7dde77938c45866d0200d647d312407118abdc1a SDC: harden free_rasd_prop_list to handle NULL pointer Signed-off-by: Heidi Eckhart diff -r 7dde77938c45 -r fcb43d2882bc src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Dec 18 10:19:52 2007 +0800 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Dec 18 09:50:50 2007 +0100 @@ -89,17 +89,19 @@ static bool dup_rasd_prop_list(struct sd return true; } -static bool free_rasd_prop_list(struct sdc_rasd_prop *prop_list) +static void free_rasd_prop_list(struct sdc_rasd_prop *prop_list) { int i; + + if (!prop_list) + return; for (i = 0; prop_list[i].field != NULL; i++) { free(prop_list[i].field); free(prop_list[i].value); } - + free (prop_list); - return true; } static struct sdc_rasd_prop *mem_max(const CMPIObjectPath *ref, From heidieck at linux.vnet.ibm.com Tue Dec 18 07:58:17 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 09:58:17 +0200 Subject: [Libvirt-cim] [PATCH 2 of 2] SDC: returned instances are not of type specific subclass In-Reply-To: Message-ID: <10e6c4ff5ebcd46dd8a2.1197968297@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197967960 -3600 # Node ID 10e6c4ff5ebcd46dd8a2cb6952ea8d8201624f4d # Parent fcb43d2882bc6925c41b7e451e6c41e42d430025 SDC: returned instances are not of type specific subclass Signed-off-by: Heidi Eckhart diff -r fcb43d2882bc -r 10e6c4ff5ebc src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Dec 18 09:50:50 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Dec 18 09:52:40 2007 +0100 @@ -42,6 +42,7 @@ #include "Virt_SettingsDefineCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_RASD.h" const static CMPIBroker *_BROKER; @@ -657,9 +658,10 @@ static CMPIInstance *sdc_rasd_inst(const sdc_rasd_type type) { CMPIInstance *inst = NULL; - struct sdc_rasd_prop *prop_list; + struct sdc_rasd_prop *prop_list = NULL; int i; - char *inst_id; + const char *inst_id = NULL; + const char *base = NULL; uint16_t resource_type; /* Defaults for the following are from CIM_SettingsDefineCapabilities.mof. */ @@ -700,15 +702,21 @@ static CMPIInstance *sdc_rasd_inst(const cu_statusf(broker, s, CMPI_RC_ERR_FAILED, "Unsupported sdc_rasd type"); - goto out; } if (s->rc != CMPI_RC_OK) goto out; + + if (rasd_classname_from_type(rasd->resource_type, &base) != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Resource type not known"); + goto out; + } inst = get_typed_instance(broker, CLASSNAME(ref), - "ResourceAllocationSettingData", + base, NAMESPACE(ref)); CMSetProperty(inst, "InstanceID", inst_id, CMPI_chars); @@ -725,10 +733,8 @@ static CMPIInstance *sdc_rasd_inst(const prop_list[i].value, prop_list[i].type); } - CU_DEBUG("freeing prop_list"); + out: free_rasd_prop_list(prop_list); - out: - CU_DEBUG("Returning inst"); return inst; } From heidieck at linux.vnet.ibm.com Tue Dec 18 11:35:22 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 12:35:22 +0100 Subject: [Libvirt-cim] [PATCH 0 of 3] Fix AC GetInstance() error In-Reply-To: <476787D1.6020802@linux.vnet.ibm.com> References: <47663BFD.3070804@linux.vnet.ibm.com> <4766C3EC.2030200@linux.vnet.ibm.com> <476787D1.6020802@linux.vnet.ibm.com> Message-ID: <4767B07A.6080606@linux.vnet.ibm.com> Heidi Eckhart wrote: > I will have a look into it and try to find out where it segfault. > After some testing and debugging, I figured out that sfcb seems to have a problem with a return result "no instance and status OK" for getInstance(). This should not cause a segfault in sfcb, but the behavior in general is correct, as this result is not valid for getInstance. If the requested instances was not found, then the status has to be set to something else than OK. I will send this issue to the sblim-devel mailing list. This patch fixes the getInstance() segfault with sfcb. diff -r 84b0269e9994 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Tue Dec 18 12:20:13 2007 +0100 +++ b/src/Virt_AllocationCapabilities.c Tue Dec 18 12:21:53 2007 +0100 @@ -118,8 +118,10 @@ static CMPIStatus alloc_cap_instances(co "Error fetching device pool InstanceID"); goto out; } - if (id && (!STREQ(inst_id, id))) + if (id && (!STREQ(inst_id, id))) { + inst_id = NULL; continue; + } s = ac_from_pool(broker, ref, device_pool_list.list[i], @@ -131,6 +133,13 @@ static CMPIStatus alloc_cap_instances(co if (id && (STREQ(inst_id, id))) break; + } + + if (id && !inst_id) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "Requested Object could not be found."); + goto out; } if (names_only) -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Tue Dec 18 11:38:42 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 13:38:42 +0200 Subject: [Libvirt-cim] [PATCH] Added installation support for openWbem Message-ID: <65312624c9db0b41ec81.1197981522@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197979046 -3600 # Node ID 65312624c9db0b41ec81ccb81a37274cf6901996 # Parent 7dde77938c45866d0200d647d312407118abdc1a Added installation support for openWbem Signed-off-by: Heidi Eckhart diff -r 7dde77938c45 -r 65312624c9db base_schema/install_base_schema.sh.in --- a/base_schema/install_base_schema.sh.in Tue Dec 18 10:19:52 2007 +0800 +++ b/base_schema/install_base_schema.sh.in Tue Dec 18 12:57:26 2007 +0100 @@ -3,6 +3,7 @@ DATA="$1" DATA="$1" NS=@CIM_VIRT_NS@ CIMOM=@CIMSERVER@ +SCHEMA_VERSION="2.16" TMPDIR=$(mktemp -d /tmp/cim_schema.XXXXX) @@ -44,6 +45,17 @@ detect_sfcb_dir() { done } +detect_openwbem_dir() { + dirs="/usr/share/mof" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d + return + fi + done +} + install_schema_pegasus() { local repo=$(detect_peg_repo) @@ -76,6 +88,26 @@ install_schema_sfcb() { sfcbrepos -f } +install_schema_openwbem() { + local dir=$(detect_openwbem_dir) + local schema_dir=$dir/cimv$SCHEMA_VERSION + + mkdir $schema_dir + if [ -d "$schema_dir" ]; then + echo "Unable to determine openwbem schema directory" + return + fi + + cp ${TMPDIR}/cimv???.mof ${TMPDIR}/CIM_Schema.mof + cp -ra ${TMPDIR}/* $schema_dir + + owcreatenamespace -u http://localhost/ -n root/virt + owmofc -u http://localhost/cimom -n root/virt $schema_dir/CIM_Schema.mof + + owcreatenamespace -u http://localhost/ -n root/interop + owmofc -u http://localhost/cimom -n root/interop $schema_dir/cimv???-interop.mof +} + if [ -z "$1" ]; then echo "Usage: $0 [source_dir]" exit 1 @@ -91,6 +123,9 @@ case "$CIMOM" in pegasus) (install_schema_pegasus) >>$DEBUG 2>&1 ;; + openwbem) + (install_schema_openwbem) >>$DEBUG 2>&1 + ;; *) echo ERROR: Unknown CIMOM: $CIMOM ;; diff -r 7dde77938c45 -r 65312624c9db provider-register.sh --- a/provider-register.sh Tue Dec 18 10:19:52 2007 +0800 +++ b/provider-register.sh Tue Dec 18 12:57:26 2007 +0100 @@ -497,6 +497,9 @@ openwbem_repository() openwbem_install() { + namespace=$1 + shift + CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then @@ -531,7 +534,7 @@ openwbem_install() if openwbem_transform $_REGFILENAME $* then chatter Registering providers with $state owcimomd - $CIMMOF $_REGFILENAME > /dev/null + $CIMMOF -u http://localhost/cimom -n $namespace $_REGFILENAME > /dev/null else echo "Failed to build OpenWBEM registration MOF." >&2 return 1 @@ -540,6 +543,9 @@ openwbem_install() openwbem_uninstall() { + namespace=$1 + shift + CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then @@ -728,7 +734,7 @@ then case $cimserver in pegasus) pegasus_install $namespace $mofs ":" $regs;; sfcb) sfcb_install $namespace $mofs ":" $regs;; - openwbem) openwbem_install $mofs ;; + openwbem) openwbem_install $namespace $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac @@ -736,7 +742,7 @@ else case $cimserver in pegasus) pegasus_uninstall $namespace $mofs ":" $regs;; sfcb) sfcb_uninstall $namespace $mofs ":" $regs;; - openwbem) openwbem_uninstall $mofs ;; + openwbem) openwbem_uninstall $namespace $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac From heidieck at linux.vnet.ibm.com Tue Dec 18 12:04:35 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 14:04:35 +0200 Subject: [Libvirt-cim] [PATCH 1 of 2] HostSystem: Added Provider qualifier to mof for OpenWbem support In-Reply-To: Message-ID: <620a0b90739abfcd6059.1197983075@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197981478 -3600 # Node ID 620a0b90739abfcd605968458fc5bcfe7ada7d6a # Parent 65312624c9db0b41ec81ccb81a37274cf6901996 HostSystem: Added Provider qualifier to mof for OpenWbem support Signed-off-by: Heidi Eckhart diff -r 65312624c9db -r 620a0b90739a schema/HostSystem.mof --- a/schema/HostSystem.mof Tue Dec 18 12:57:26 2007 +0100 +++ b/schema/HostSystem.mof Tue Dec 18 13:37:58 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_ComputerSystem to represent " - "the Xen host system.") + "the Xen host system."), + Provider("cmpi:Virt_HostSystem") ] class Xen_HostSystem : CIM_ComputerSystem { @@ -10,7 +11,8 @@ class Xen_HostSystem : CIM_ComputerSyste [Description ( "A class derived from CIM_ComputerSystem to represent " - "the KVM host system.") + "the KVM host system."), + Provider("cmpi:Virt_HostSystem") ] class KVM_HostSystem : CIM_ComputerSystem { From heidieck at linux.vnet.ibm.com Tue Dec 18 12:04:36 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 14:04:36 +0200 Subject: [Libvirt-cim] [PATCH 2 of 2] Renamed provider from HostSystemProvider to HostSystem In-Reply-To: Message-ID: <3466e99c2b386af976b9.1197983076@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1197982193 -3600 # Node ID 3466e99c2b386af976b9f1f0e230606ea6a571eb # Parent 620a0b90739abfcd605968458fc5bcfe7ada7d6a Renamed provider from HostSystemProvider to HostSystem Signed-off-by: Heidi Eckhart diff -r 620a0b90739a -r 3466e99c2b38 schema/HostSystem.registration --- a/schema/HostSystem.registration Tue Dec 18 13:37:58 2007 +0100 +++ b/schema/HostSystem.registration Tue Dec 18 13:49:53 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostSystem root/virt Virt_HostSystemProvider Virt_HostSystem instance -KVM_HostSystem root/virt Virt_HostSystemProvider Virt_HostSystem instance +Xen_HostSystem root/virt Virt_HostSystem Virt_HostSystem instance +KVM_HostSystem root/virt Virt_HostSystem Virt_HostSystem instance diff -r 620a0b90739a -r 3466e99c2b38 src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Tue Dec 18 13:37:58 2007 +0100 +++ b/src/Virt_HostSystem.c Tue Dec 18 13:49:53 2007 +0100 @@ -173,7 +173,7 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_HostSystemProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, Virt_HostSystem, _BROKER, libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Tue Dec 18 12:04:34 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Tue, 18 Dec 2007 14:04:34 +0200 Subject: [Libvirt-cim] [PATCH 0 of 2] [RFC] Prepare provider registration and provider name for OpenWbem Message-ID: To enable the libvirt-cim providers for registration and work with OpenWbem it is necessary to update the mof files with an additional "Provider" qualifier and slightly change the provider name. patch 1: updated the mof files with the additional "Provider" qualifier. The syntax is ":". For our providers this means "cmpi:", e.g. "cmpi:Virt_HostSystem" patch 2: the registration for OpenWbem requires an entry point _Create_InstanceMI, which means that the filename and the providername have to become the same. This is necessary to let STD_InstanceMIStub correctly create the right CMPI entry points. I have tested this setup with sfcb, Pegasus and OpenWbem and it worked for all. If no one encounteres issues with this slighly changed provider naming, I will create patches for all providers. If someone has a hard requirement to name the provider different compared to the file, please raise your hand ;). I look forward an interesting discussion. From kaitlin at linux.vnet.ibm.com Tue Dec 18 16:39:35 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 18 Dec 2007 08:39:35 -0800 Subject: [Libvirt-cim] [PATCH 0 of 3] Fix AC GetInstance() error In-Reply-To: <4767B07A.6080606@linux.vnet.ibm.com> References: <47663BFD.3070804@linux.vnet.ibm.com> <4766C3EC.2030200@linux.vnet.ibm.com> <476787D1.6020802@linux.vnet.ibm.com> <4767B07A.6080606@linux.vnet.ibm.com> Message-ID: <4767F7C7.6080407@linux.vnet.ibm.com> Heidi Eckhart wrote: > Heidi Eckhart wrote: >> I will have a look into it and try to find out where it segfault. >> > After some testing and debugging, I figured out that sfcb seems to have > a problem with a return result "no instance and status OK" for > getInstance(). This should not cause a segfault in sfcb, but the > behavior in general is correct, as this result is not valid for > getInstance. If the requested instances was not found, then the status > has to be set to something else than OK. I will send this issue to the > sblim-devel mailing list. Thanks for looking into this. =) Sounds like an interesting bug - good catch! > > This patch fixes the getInstance() segfault with sfcb. > > diff -r 84b0269e9994 src/Virt_AllocationCapabilities.c > --- a/src/Virt_AllocationCapabilities.c Tue Dec 18 12:20:13 2007 +0100 > +++ b/src/Virt_AllocationCapabilities.c Tue Dec 18 12:21:53 2007 +0100 > @@ -118,8 +118,10 @@ static CMPIStatus alloc_cap_instances(co > "Error fetching device pool > InstanceID"); > goto out; > } > - if (id && (!STREQ(inst_id, id))) > + if (id && (!STREQ(inst_id, id))) { > + inst_id = NULL; > continue; > + } > s = ac_from_pool(broker, ref, > device_pool_list.list[i], > @@ -131,6 +133,13 @@ static CMPIStatus alloc_cap_instances(co > > if (id && (STREQ(inst_id, id))) > break; > + } > + > + if (id && !inst_id) { > + cu_statusf(broker, &s, > + CMPI_RC_ERR_NOT_FOUND, > + "Requested Object could not be found."); > + goto out; > } > > if (names_only) > > I can send out a re-worked patch. Thanks for coding this up. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Dec 18 17:52:10 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 18 Dec 2007 09:52:10 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] [RFC] Prepare provider registration and provider name for OpenWbem In-Reply-To: References: Message-ID: <476808CA.8060405@linux.vnet.ibm.com> Heidi Eckhart wrote: > To enable the libvirt-cim providers for registration and work with OpenWbem > it is necessary to update the mof files with an additional "Provider" qualifier > and slightly change the provider name. > > patch 1: updated the mof files with the additional "Provider" qualifier. The syntax is ":". For our providers this means "cmpi:", e.g. "cmpi:Virt_HostSystem" > patch 2: the registration for OpenWbem requires an entry point _Create_InstanceMI, which means that the filename and the providername have to become the same. This is necessary to let STD_InstanceMIStub correctly create the right CMPI entry points. > > I have tested this setup with sfcb, Pegasus and OpenWbem and it worked for all. If no one encounteres issues with this slighly changed provider naming, I will create patches for all providers. If someone has a hard requirement to name the provider different compared to the file, please raise your hand ;). I look forward an interesting discussion. > I tested this with tog-pegasus-2.6.1-2.fc8 - no problems for me. I don't have any foreseeable objections to the name change either. I haven't seen the "Provider" qualifier before. Is this something non-standard that OpenWbem requires? Or is this a standard qualifier that Pegasus / sfcb opt not to use? -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Tue Dec 18 18:09:39 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 18 Dec 2007 10:09:39 -0800 Subject: [Libvirt-cim] [PATCH] Added installation support for openWbem In-Reply-To: <65312624c9db0b41ec81.1197981522@localhost.localdomain> (Heidi Eckhart's message of "Tue, 18 Dec 2007 13:38:42 +0200") References: <65312624c9db0b41ec81.1197981522@localhost.localdomain> Message-ID: <878x3rq3h8.fsf@theine.beaverton.ibm.com> HE> +SCHEMA_VERSION="2.16" Can you also modify the other places in the script that use the schema version to use this instead of wildcards? I was hoping to make it unnecessary to tweak a version variable in this script when changing, but I don't know that that's really a big deal. Maybe this should be something we handle with configure.ac? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Tue Dec 18 18:18:20 2007 From: danms at us.ibm.com (Dan Smith) Date: Tue, 18 Dec 2007 10:18:20 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] [RFC] Prepare provider registration and provider name for OpenWbem In-Reply-To: (Heidi Eckhart's message of "Tue, 18 Dec 2007 14:04:34 +0200") References: Message-ID: <874pefq32r.fsf@theine.beaverton.ibm.com> HE> patch 1: updated the mof files with the additional "Provider" HE> qualifier. The syntax is ":". For HE> our providers this means "cmpi:", HE> e.g. "cmpi:Virt_HostSystem" Ugh.. Is this how OpenWBEM does registration? Meaning, does this eliminate the need for the .registration files for OpenWBEM? I guess by now I should expect no fewer than X different ways of doing things, given X CIMOMs :) HE> patch 2: the registration for OpenWbem requires an entry point HE> _Create_InstanceMI, which means that the filename and HE> the providername have to become the same. This is necessary to let HE> STD_InstanceMIStub correctly create the right CMPI entry points. Seems reasonable, and possibly more organized. HE> I have tested this setup with sfcb, Pegasus and OpenWbem and it HE> worked for all. If no one encounteres issues with this slighly HE> changed provider naming, I will create patches for all HE> providers. If someone has a hard requirement to name the provider HE> different compared to the file, please raise your hand ;). I look HE> forward an interesting discussion. The easiest thing would be to go through and rename the providers to match the files, but I wonder if it isn't worth organizing things a bit further. Right now, we have some that are completely expanded (Virt_VirtualSystemManagementService.c) and others that are compressed (Virt_VSSD.c). Would it make sense to also rename the files (where appropriate) for more consistency? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Tue Dec 18 18:39:54 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 18 Dec 2007 10:39:54 -0800 Subject: [Libvirt-cim] [PATCH 0 of 3] #2 Fix AC GetInstance() error Message-ID: Update: sfcb seg faults if no instance is found but the provider returns a success. Add a fix so that if an instance isn't found, and error is returned. AC GetInstance() currently returns an error. This patchset fixes that error and also cleans up some left over functions. From kaitlin at linux.vnet.ibm.com Tue Dec 18 18:39:57 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 18 Dec 2007 10:39:57 -0800 Subject: [Libvirt-cim] [PATCH 3 of 3] AC no longer needs libVirt_RASD In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197677598 28800 # Node ID a1a748c19a322652edb654c488d4c69603af4f23 # Parent d26b589173d37b0b619a9a8bc31d714bf5ed8e84 AC no longer needs libVirt_RASD. This cleans up the AC build dependencies. Signed-off-by: Kaitlin Rupert diff -r d26b589173d3 -r a1a748c19a32 src/Makefile.am --- a/src/Makefile.am Fri Dec 14 16:05:58 2007 -0800 +++ b/src/Makefile.am Fri Dec 14 16:13:18 2007 -0800 @@ -2,7 +2,6 @@ SUBDIRS = tests SUBDIRS = tests noinst_HEADERS = profiles.h svpc_types.h \ - Virt_AllocationCapabilities.h \ Virt_ComputerSystem.h \ Virt_ComputerSystemIndication.h \ Virt_Device.h \ @@ -98,9 +97,9 @@ libVirt_ElementCapabilities_la_LIBADD = -lVirt_HostSystem \ -lVirt_VSMigrationCapabilities -libVirt_AllocationCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la +libVirt_AllocationCapabilities_la_DEPENDENCIES = libVirt_DevicePool.la libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c -libVirt_AllocationCapabilities_la_LIBADD = -lVirt_RASD -lVirt_DevicePool +libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c From kaitlin at linux.vnet.ibm.com Tue Dec 18 18:39:55 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 18 Dec 2007 10:39:55 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1198002754 28800 # Node ID b85641f03ae2507e894311f9b31d197b5acc5a39 # Parent d6cf74b64c720d65da17bdac2604f7d0f1d31f7e AC GetInstance() fails with a "Could not get ResourceType" error. GetInstance() was calling return_alloc_cap(), which in turn called rasd_type_from_classname(). rasd_type_from_classname() is expecting the classname to be one of the supported RASD type classnames, but this doesn't match the AC classname. Instead, GetInstance() should only return an instance if the supplied InstanceID matches one of the existing instances. alloc_cap_instances() should be modified to take a InstanceID argument. Failing query: wbemcli gi 'http://localhost/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"' Signed-off-by: Kaitlin Rupert diff -r d6cf74b64c72 -r b85641f03ae2 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Mon Dec 17 10:23:40 2007 -0800 +++ b/src/Virt_AllocationCapabilities.c Tue Dec 18 10:32:34 2007 -0800 @@ -20,6 +20,7 @@ */ #include #include +#include #include #include @@ -131,7 +132,8 @@ static CMPIStatus alloc_cap_instances(co const CMPIObjectPath *ref, const CMPIResult *results, bool names_only, - const char **properties) + const char **properties, + const char *id) { int i; virConnectPtr conn = NULL; @@ -139,6 +141,7 @@ static CMPIStatus alloc_cap_instances(co struct inst_list alloc_cap_list; struct inst_list device_pool_list; CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *inst_id; CU_DEBUG("In alloc_cap_instances()"); @@ -165,6 +168,18 @@ static CMPIStatus alloc_cap_instances(co } for (i = 0; i < device_pool_list.cur; i++) { + if (cu_get_str_prop(device_pool_list.list[i], + "InstanceID", &inst_id) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Error fetching device pool InstanceID"); + goto out; + } + if (id && (!STREQ(inst_id, id))) { + inst_id = NULL; + continue; + } + s = ac_from_pool(broker, ref, device_pool_list.list[i], &alloc_cap_inst); @@ -172,6 +187,16 @@ static CMPIStatus alloc_cap_instances(co goto out; inst_list_add(&alloc_cap_list, alloc_cap_inst); + + if (id && (STREQ(inst_id, id))) + break; + } + + if (id && !inst_id) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "Requested Object could not be found."); + goto out; } if (names_only) @@ -192,7 +217,22 @@ static CMPIStatus GetInstance(CMPIInstan const CMPIObjectPath *reference, const char **properties) { - return return_alloc_cap(reference, results, 0); + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char* id; + + if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "No InstanceID specified"); + return s; + } + + return alloc_cap_instances(_BROKER, + reference, + results, + false, + properties, + id); } static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, @@ -200,7 +240,7 @@ static CMPIStatus EnumInstanceNames(CMPI const CMPIResult *results, const CMPIObjectPath *reference) { - return alloc_cap_instances(_BROKER, reference, results, true, NULL); + return alloc_cap_instances(_BROKER, reference, results, true, NULL, NULL); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -209,7 +249,7 @@ static CMPIStatus EnumInstances(CMPIInst const CMPIObjectPath *reference, const char **properties) { - return alloc_cap_instances(_BROKER, reference, results, false, properties); + return alloc_cap_instances(_BROKER, reference, results, false, properties, NULL); } DEFAULT_CI(); From kaitlin at linux.vnet.ibm.com Tue Dec 18 18:39:56 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 18 Dec 2007 10:39:56 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Clean up unneeded functions in AC In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1197677158 28800 # Node ID d26b589173d37b0b619a9a8bc31d714bf5ed8e84 # Parent b85641f03ae2507e894311f9b31d197b5acc5a39 Clean up unneeded functions in AC. Now that GetInstance is calling alloc_cap_instances(), get_alloc_cap() and return_alloc_cap() are no longer needed. This removes the need for Virt_AllocationCapabilities.h Also clean up lengthy function calls. Signed-off-by: Kaitlin Rupert diff -r b85641f03ae2 -r d26b589173d3 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Tue Dec 18 10:32:34 2007 -0800 +++ b/src/Virt_AllocationCapabilities.c Fri Dec 14 16:05:58 2007 -0800 @@ -31,66 +31,9 @@ #include "misc_util.h" -#include "Virt_AllocationCapabilities.h" -#include "Virt_RASD.h" #include "Virt_DevicePool.h" const static CMPIBroker *_BROKER; - -CMPIStatus get_alloc_cap(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **inst) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - char *inst_id; - uint16_t type; - int ret; - - *inst = get_typed_instance(broker, - CLASSNAME(ref), - "AllocationCapabilities", - NAMESPACE(ref)); - - if (rasd_type_from_classname(CLASSNAME(ref), &type) != CMPI_RC_OK) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get ResourceType"); - goto out; - } - - ret = asprintf(&inst_id, "%hi/%s", type, "0"); - if (ret == -1) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get InstanceID"); - goto out; - } - - CMSetProperty(*inst, "InstanceID", inst_id, CMPI_chars); - CMSetProperty(*inst, "ResourceType", &type, CMPI_uint16); - - out: - return s; -} - -static CMPIStatus return_alloc_cap(const CMPIObjectPath *ref, - const CMPIResult *results, - int names_only) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *inst = NULL; - - s = get_alloc_cap(_BROKER, ref, &inst); - if (s.rc != CMPI_RC_OK) - goto out; - - if (names_only) - cu_return_instance_name(results, inst); - else - CMReturnInstance(results, inst); - out: - return s; -} static CMPIStatus ac_from_pool(const CMPIBroker *broker, const CMPIObjectPath *ref, @@ -240,7 +183,12 @@ static CMPIStatus EnumInstanceNames(CMPI const CMPIResult *results, const CMPIObjectPath *reference) { - return alloc_cap_instances(_BROKER, reference, results, true, NULL, NULL); + return alloc_cap_instances(_BROKER, + reference, + results, + true, + NULL, + NULL); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -249,7 +197,12 @@ static CMPIStatus EnumInstances(CMPIInst const CMPIObjectPath *reference, const char **properties) { - return alloc_cap_instances(_BROKER, reference, results, false, properties, NULL); + return alloc_cap_instances(_BROKER, + reference, + results, + false, + properties, + NULL); } DEFAULT_CI(); diff -r b85641f03ae2 -r d26b589173d3 src/Virt_AllocationCapabilities.h --- a/src/Virt_AllocationCapabilities.h Tue Dec 18 10:32:34 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright IBM Corp. 2007 - * - * Authors: - * Jay Gagnon - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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 - */ -CMPIStatus get_alloc_cap(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **inst); -/* - * Local Variables: - * mode: C - * c-set-style: "K&R" - * tab-width: 8 - * c-basic-offset: 8 - * indent-tabs-mode: nil - * End: - */ From heidieck at linux.vnet.ibm.com Wed Dec 19 08:56:13 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 09:56:13 +0100 Subject: [Libvirt-cim] [PATCH 0 of 2] [RFC] Prepare provider registration and provider name for OpenWbem In-Reply-To: <476808CA.8060405@linux.vnet.ibm.com> References: <476808CA.8060405@linux.vnet.ibm.com> Message-ID: <4768DCAD.8080703@linux.vnet.ibm.com> Kaitlin Rupert wrote: > I haven't seen the "Provider" qualifier before. Is this something > non-standard that OpenWbem requires? Or is this a standard qualifier > that Pegasus / sfcb opt not to use? > This is very close to what the "Provider" qualifier is. Section 2.5.3 "Optional Qualifiers" of DMTF's DSP0004 "CIM Infrastructure Specification" v2.3 Final describes it as following: The optional qualifiers listed in this table address situations that are not common to all CIM-compliant implementations. Thus, CIM-compliant implementations can ignore optional qualifiers since they are not required to interpret or understand these qualifiers. These are provided in the specification to avoid random user-defined qualifiers for these recurring situations. ... PROVIDER: An implementation specific handle to the instrumentation that populates those elements in the schemas that refer to dynamic data. ... OpenWbem makes use of the optional "Provider" qualifier, while Pegasus and sfcb ignore the qualifier and have their own approach to register providers. That's why we also need the provider_register script and the registration files. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 19 11:28:42 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 12:28:42 +0100 Subject: [Libvirt-cim] [PATCH 0 of 2] [RFC] Prepare provider registration and provider name for OpenWbem In-Reply-To: <874pefq32r.fsf@theine.beaverton.ibm.com> References: <874pefq32r.fsf@theine.beaverton.ibm.com> Message-ID: <4769006A.7000801@linux.vnet.ibm.com> Dan Smith wrote: > HE> patch 1: updated the mof files with the additional "Provider" > HE> qualifier. The syntax is ":". For > HE> our providers this means "cmpi:", > HE> e.g. "cmpi:Virt_HostSystem" > > Ugh.. Is this how OpenWBEM does registration? Yes, and even more. The provider_register script added an additional ":" between the and . I have fixed this and will resend with the complete patch set. > Meaning, does this > eliminate the need for the .registration files for OpenWBEM? Yes, but only for OpenWbem. We still need it for Pegasus and sfcb. > I guess > by now I should expect no fewer than X different ways of doing things, > given X CIMOMs :) > I can only say - yes ;). > HE> patch 2: the registration for OpenWbem requires an entry point > HE> _Create_InstanceMI, which means that the filename and > HE> the providername have to become the same. This is necessary to let > HE> STD_InstanceMIStub correctly create the right CMPI entry points. > > Seems reasonable, and possibly more organized. > Yes, but maybe this is also a limitation. The approach to allow a different module and provider name enables hosting multiple providers in one module. Its not that I would recommend writing such a provider module - really not, because this blows up the module and makes the code worse readable - but this possibility is then gone. For the libvirt-cim providers no problem, because we do not - and definitely will not ;) - make use of this possibility. I'm only saying this to describe a bit of the background for defining providername and modulename in the registration files. > HE> I have tested this setup with sfcb, Pegasus and OpenWbem and itI would rather call it > HE> worked for all. If no one encounteres issues with this slighly > HE> changed provider naming, I will create patches for all > HE> providers. If someone has a hard requirement to name the provider > HE> different compared to the file, please raise your hand ;). I look > HE> forward an interesting discussion. > > The easiest thing would be to go through and rename the providers to > match the files, but I wonder if it isn't worth organizing things a > bit further. Right now, we have some that are completely expanded > (Virt_VirtualSystemManagementService.c) and others that are compressed > (Virt_VSSD.c). Would it make sense to also rename the files (where > appropriate) for more consistency? > > Yes, consistency makes always sense :) ! If the others are ok with this change, I will expand the filenames of the compressed providers in a separate patch set. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Wed Dec 19 12:15:02 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:15:02 +0200 Subject: [Libvirt-cim] [PATCH] Remove error message of trailing backslash in src/Makefile.am Message-ID: <133cbb1df893f2d031cb.1198070102@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198059368 -3600 # Node ID 133cbb1df893f2d031cba3534c88936bce69da78 # Parent 615554f6eca4cd21e5715a3af73a616637e54f96 Remove error message of trailing backslash in src/Makefile.am Running libtool ... Running aclocal ... Running autoheader ... Running automake ... src/Makefile.am:17: whitespace following trailing backslash Running autoconf ... You may now run ./configure Signed-off-by: Heidi Eckhart diff -r 615554f6eca4 -r 133cbb1df893 src/Makefile.am --- a/src/Makefile.am Fri Dec 14 16:13:18 2007 -0800 +++ b/src/Makefile.am Wed Dec 19 11:16:08 2007 +0100 @@ -14,7 +14,7 @@ noinst_HEADERS = profiles.h svpc_types.h Virt_SettingsDefineCapabilities.h \ Virt_VirtualSystemManagementCapabilities.h \ Virt_VirtualSystemManagementService.h \ - Virt_VSSD.h \ + Virt_VSSD.h \ Virt_VSMigrationCapabilities.h \ Virt_VSMigrationService.h From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:52 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:52 +0200 Subject: [Libvirt-cim] [PATCH 01 of 29] Added installation support for openWbem In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198059372 -3600 # Node ID cc317a7ef54789a792c264b0906b348e6f29a8a4 # Parent 133cbb1df893f2d031cba3534c88936bce69da78 Added installation support for openWbem Signed-off-by: Heidi Eckhart diff -r 133cbb1df893 -r cc317a7ef547 base_schema/install_base_schema.sh.in --- a/base_schema/install_base_schema.sh.in Wed Dec 19 11:16:08 2007 +0100 +++ b/base_schema/install_base_schema.sh.in Wed Dec 19 11:16:12 2007 +0100 @@ -3,6 +3,7 @@ DATA="$1" DATA="$1" NS=@CIM_VIRT_NS@ CIMOM=@CIMSERVER@ +SCHEMA_VERSION="2.16" TMPDIR=$(mktemp -d /tmp/cim_schema.XXXXX) @@ -44,6 +45,17 @@ detect_sfcb_dir() { done } +detect_openwbem_dir() { + dirs="/usr/share/mof" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d + return + fi + done +} + install_schema_pegasus() { local repo=$(detect_peg_repo) @@ -76,6 +88,26 @@ install_schema_sfcb() { sfcbrepos -f } +install_schema_openwbem() { + local dir=$(detect_openwbem_dir) + local schema_dir=$dir/cimv$SCHEMA_VERSION + + mkdir $schema_dir + if [ -d "$schema_dir" ]; then + echo "Unable to determine openwbem schema directory" + return + fi + + cp ${TMPDIR}/cimv???.mof ${TMPDIR}/CIM_Schema.mof + cp -ra ${TMPDIR}/* $schema_dir + + owcreatenamespace -u http://localhost/ -n root/virt + owmofc -u http://localhost/cimom -n root/virt $schema_dir/CIM_Schema.mof + + owcreatenamespace -u http://localhost/ -n root/interop + owmofc -u http://localhost/cimom -n root/interop $schema_dir/cimv???-interop.mof +} + if [ -z "$1" ]; then echo "Usage: $0 [source_dir]" exit 1 @@ -91,6 +123,9 @@ case "$CIMOM" in pegasus) (install_schema_pegasus) >>$DEBUG 2>&1 ;; + openwbem) + (install_schema_openwbem) >>$DEBUG 2>&1 + ;; *) echo ERROR: Unknown CIMOM: $CIMOM ;; diff -r 133cbb1df893 -r cc317a7ef547 provider-register.sh --- a/provider-register.sh Wed Dec 19 11:16:08 2007 +0100 +++ b/provider-register.sh Wed Dec 19 11:16:12 2007 +0100 @@ -477,7 +477,7 @@ openwbem_transform() then for _f in $moffiles do - sed "s/Provider *( *\"cmpi:/Provider(\"cmpi::/g" < $_f >> $OUTFILE + cat $_f >> $OUTFILE done fi } @@ -497,6 +497,9 @@ openwbem_repository() openwbem_install() { + namespace=$1 + shift + CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then @@ -531,7 +534,7 @@ openwbem_install() if openwbem_transform $_REGFILENAME $* then chatter Registering providers with $state owcimomd - $CIMMOF $_REGFILENAME > /dev/null + $CIMMOF -u http://localhost/cimom -n $namespace $_REGFILENAME > /dev/null else echo "Failed to build OpenWBEM registration MOF." >&2 return 1 @@ -540,6 +543,9 @@ openwbem_install() openwbem_uninstall() { + namespace=$1 + shift + CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then @@ -728,7 +734,7 @@ then case $cimserver in pegasus) pegasus_install $namespace $mofs ":" $regs;; sfcb) sfcb_install $namespace $mofs ":" $regs;; - openwbem) openwbem_install $mofs ;; + openwbem) openwbem_install $namespace $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac @@ -736,7 +742,7 @@ else case $cimserver in pegasus) pegasus_uninstall $namespace $mofs ":" $regs;; sfcb) sfcb_uninstall $namespace $mofs ":" $regs;; - openwbem) openwbem_uninstall $mofs ;; + openwbem) openwbem_uninstall $namespace $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:53 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:53 +0200 Subject: [Libvirt-cim] [PATCH 02 of 29] HostSystem: OpenWbem support In-Reply-To: Message-ID: <560ee76080af4fb553d9.1198070393@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198064138 -3600 # Node ID 560ee76080af4fb553d98c19d1ddf8ff2d6c6f91 # Parent cc317a7ef54789a792c264b0906b348e6f29a8a4 HostSystem: OpenWbem support - rename provider from HostSystemProvider to HostSystem - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r cc317a7ef547 -r 560ee76080af schema/HostSystem.mof --- a/schema/HostSystem.mof Wed Dec 19 11:16:12 2007 +0100 +++ b/schema/HostSystem.mof Wed Dec 19 12:35:38 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_ComputerSystem to represent " - "the Xen host system.") + "the Xen host system."), + Provider("cmpi::Virt_HostSystem") ] class Xen_HostSystem : CIM_ComputerSystem { @@ -10,7 +11,8 @@ class Xen_HostSystem : CIM_ComputerSyste [Description ( "A class derived from CIM_ComputerSystem to represent " - "the KVM host system.") + "the KVM host system."), + Provider("cmpi::Virt_HostSystem") ] class KVM_HostSystem : CIM_ComputerSystem { diff -r cc317a7ef547 -r 560ee76080af schema/HostSystem.registration --- a/schema/HostSystem.registration Wed Dec 19 11:16:12 2007 +0100 +++ b/schema/HostSystem.registration Wed Dec 19 12:35:38 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostSystem root/virt Virt_HostSystemProvider Virt_HostSystem instance -KVM_HostSystem root/virt Virt_HostSystemProvider Virt_HostSystem instance +Xen_HostSystem root/virt Virt_HostSystem Virt_HostSystem instance +KVM_HostSystem root/virt Virt_HostSystem Virt_HostSystem instance diff -r cc317a7ef547 -r 560ee76080af src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Wed Dec 19 11:16:12 2007 +0100 +++ b/src/Virt_HostSystem.c Wed Dec 19 12:35:38 2007 +0100 @@ -173,7 +173,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_HostSystemProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_HostSystem, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:51 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:51 +0200 Subject: [Libvirt-cim] [PATCH 00 of 29] Enable libvirt-cim providers for OpenWbem Message-ID: updated schema and provider registration scripts added "Provider" qualifier to each provider's mof fixed provider and module naming From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:55 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:55 +0200 Subject: [Libvirt-cim] [PATCH 04 of 29] HostedDependency: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198064141 -3600 # Node ID b508d48c1a8559ae9eed9278a4f9cfc02bf09a3b # Parent 209814f0021e473055e0355f8078511f3de6beb7 HostedDependency: OpenWbem support - rename provider from HostedDependencyProvider to HostedDependency - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 209814f0021e -r b508d48c1a85 schema/HostedDependency.mof --- a/schema/HostedDependency.mof Wed Dec 19 12:35:40 2007 +0100 +++ b/schema/HostedDependency.mof Wed Dec 19 12:35:41 2007 +0100 @@ -3,7 +3,8 @@ [Association, Description ( "HostedDependency defines a ManagedElement in the context of " - "another ManagedElement in which it resides.") + "another ManagedElement in which it resides."), + Provider("cmpi::Virt_HostedDependency") ] class Xen_HostedDependency : CIM_HostedDependency { @@ -12,7 +13,8 @@ class Xen_HostedDependency : CIM_HostedD [Association, Description ( "HostedDependency defines a ManagedElement in the context of " - "another ManagedElement in which it resides.") + "another ManagedElement in which it resides."), + Provider("cmpi::Virt_HostedDependency") ] class KVM_HostedDependency : CIM_HostedDependency { diff -r 209814f0021e -r b508d48c1a85 schema/HostedDependency.registration --- a/schema/HostedDependency.registration Wed Dec 19 12:35:40 2007 +0100 +++ b/schema/HostedDependency.registration Wed Dec 19 12:35:41 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostedDependency root/virt Virt_HostedDependencyProvider Virt_HostedDependency association -KVM_HostedDependency root/virt Virt_HostedDependencyProvider Virt_HostedDependency association +Xen_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association +KVM_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association diff -r 209814f0021e -r b508d48c1a85 src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Wed Dec 19 12:35:40 2007 +0100 +++ b/src/Virt_HostedDependency.c Wed Dec 19 12:35:41 2007 +0100 @@ -134,7 +134,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_HostedDependencyProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_HostedDependency, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:56 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:56 +0200 Subject: [Libvirt-cim] [PATCH 05 of 29] AllocationCapabilities: OpenWbem support In-Reply-To: Message-ID: <98cfb1a1d84a63aca65c.1198070396@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198064142 -3600 # Node ID 98cfb1a1d84a63aca65cd1a04fac1d5e25b87cf9 # Parent b508d48c1a8559ae9eed9278a4f9cfc02bf09a3b AllocationCapabilities: OpenWbem support - rename provider from AllocationCapabilitiesProvider to AllocationCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r b508d48c1a85 -r 98cfb1a1d84a schema/AllocationCapabilities.mof --- a/schema/AllocationCapabilities.mof Wed Dec 19 12:35:41 2007 +0100 +++ b/schema/AllocationCapabilities.mof Wed Dec 19 12:35:42 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_AllocationCapabilities")] class Xen_AllocationCapabilities : CIM_AllocationCapabilities { }; +[Provider("cmpi::Virt_AllocationCapabilities")] class KVM_AllocationCapabilities : CIM_AllocationCapabilities { }; diff -r b508d48c1a85 -r 98cfb1a1d84a schema/AllocationCapabilities.registration --- a/schema/AllocationCapabilities.registration Wed Dec 19 12:35:41 2007 +0100 +++ b/schema/AllocationCapabilities.registration Wed Dec 19 12:35:42 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_AllocationCapabilities root/virt Virt_AllocationCapabilitiesProvider Virt_AllocationCapabilities instance -KVM_AllocationCapabilities root/virt Virt_AllocationCapabilitiesProvider Virt_AllocationCapabilities instance +Xen_AllocationCapabilities root/virt Virt_AllocationCapabilities Virt_AllocationCapabilities instance +KVM_AllocationCapabilities root/virt Virt_AllocationCapabilities Virt_AllocationCapabilities instance diff -r b508d48c1a85 -r 98cfb1a1d84a src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Wed Dec 19 12:35:41 2007 +0100 +++ b/src/Virt_AllocationCapabilities.c Wed Dec 19 12:35:42 2007 +0100 @@ -211,7 +211,9 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_AllocationCapabilitiesProvider, _BROKER, +STD_InstanceMIStub(, + Virt_AllocationCapabilities, + _BROKER, libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:54 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:54 +0200 Subject: [Libvirt-cim] [PATCH 03 of 29] ComputerSystem: OpenWbem support In-Reply-To: Message-ID: <209814f0021e473055e0.1198070394@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198064140 -3600 # Node ID 209814f0021e473055e0355f8078511f3de6beb7 # Parent 560ee76080af4fb553d98c19d1ddf8ff2d6c6f91 ComputerSystem: OpenWbem support - rename provider from ComputerSystemProvider to ComputerSystem - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 560ee76080af -r 209814f0021e schema/ComputerSystem.mof --- a/schema/ComputerSystem.mof Wed Dec 19 12:35:38 2007 +0100 +++ b/schema/ComputerSystem.mof Wed Dec 19 12:35:40 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_ComputerSystem to represent " - "the Xen virtual machines/domains running on the system.") + "the Xen virtual machines/domains running on the system."), + Provider("cmpi::Virt_ComputerSystem") ] class Xen_ComputerSystem : CIM_ComputerSystem { @@ -14,7 +15,8 @@ class Xen_ComputerSystem : CIM_ComputerS [Description ( "A class derived from CIM_ComputerSystem to represent " - "the KVM virtual machines running on the system.") + "the KVM virtual machines running on the system."), + Provider("cmpi::Virt_ComputerSystem") ] class KVM_ComputerSystem : CIM_ComputerSystem { diff -r 560ee76080af -r 209814f0021e schema/ComputerSystem.registration --- a/schema/ComputerSystem.registration Wed Dec 19 12:35:38 2007 +0100 +++ b/schema/ComputerSystem.registration Wed Dec 19 12:35:40 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ComputerSystem root/virt Virt_ComputerSystemProvider Virt_ComputerSystem instance method -KVM_ComputerSystem root/virt Virt_ComputerSystemProvider Virt_ComputerSystem instance +Xen_ComputerSystem root/virt Virt_ComputerSystem Virt_ComputerSystem instance method +KVM_ComputerSystem root/virt Virt_ComputerSystem Virt_ComputerSystem instance diff -r 560ee76080af -r 209814f0021e src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Wed Dec 19 12:35:38 2007 +0100 +++ b/src/Virt_ComputerSystem.c Wed Dec 19 12:35:40 2007 +0100 @@ -680,7 +680,10 @@ static CMPIStatus state_change(CMPIMetho return s; } -STD_InstanceMIStub(, Virt_ComputerSystemProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_ComputerSystem, + _BROKER, + libvirt_cim_init()); static struct method_handler RequestStateChange = { .name = "RequestStateChange", @@ -697,7 +700,7 @@ static struct method_handler *my_handler }; STDIM_MethodMIStub(, - Virt_ComputerSystemProvider, + Virt_ComputerSystem, _BROKER, libvirt_cim_init(), my_handlers); From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:57 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:57 +0200 Subject: [Libvirt-cim] [PATCH 06 of 29] DiskPool, MemoryPool, NetPool, ProcessorPool: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198064682 -3600 # Node ID b5932d3a178fad406a082a619d5ad0770b0b5952 # Parent 98cfb1a1d84a63aca65cd1a04fac1d5e25b87cf9 DiskPool, MemoryPool, NetPool, ProcessorPool: OpenWbem support - rename provider from DevicePoolProvider to DevicePool - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 98cfb1a1d84a -r b5932d3a178f schema/DiskPool.mof --- a/schema/DiskPool.mof Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/DiskPool.mof Wed Dec 19 12:44:42 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_DiskPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_DiskPool : CIM_ResourcePool { }; diff -r 98cfb1a1d84a -r b5932d3a178f schema/DiskPool.registration --- a/schema/DiskPool.registration Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/DiskPool.registration Wed Dec 19 12:44:42 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_DiskPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_DiskPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance +Xen_DiskPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_DiskPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 98cfb1a1d84a -r b5932d3a178f schema/MemoryPool.mof --- a/schema/MemoryPool.mof Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/MemoryPool.mof Wed Dec 19 12:44:42 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_MemoryPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_MemoryPool : CIM_ResourcePool { }; diff -r 98cfb1a1d84a -r b5932d3a178f schema/MemoryPool.registration --- a/schema/MemoryPool.registration Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/MemoryPool.registration Wed Dec 19 12:44:42 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_MemoryPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_MemoryPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance +Xen_MemoryPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_MemoryPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 98cfb1a1d84a -r b5932d3a178f schema/NetPool.mof --- a/schema/NetPool.mof Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/NetPool.mof Wed Dec 19 12:44:42 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_NetworkPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_NetworkPool : CIM_ResourcePool { }; diff -r 98cfb1a1d84a -r b5932d3a178f schema/NetPool.registration --- a/schema/NetPool.registration Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/NetPool.registration Wed Dec 19 12:44:42 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_NetworkPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_NetworkPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance \ No newline at end of file +Xen_NetworkPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_NetworkPool root/virt Virt_DevicePool Virt_DevicePool instance \ No newline at end of file diff -r 98cfb1a1d84a -r b5932d3a178f schema/ProcessorPool.mof --- a/schema/ProcessorPool.mof Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/ProcessorPool.mof Wed Dec 19 12:44:42 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_ProcessorPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_ProcessorPool : CIM_ResourcePool { }; diff -r 98cfb1a1d84a -r b5932d3a178f schema/ProcessorPool.registration --- a/schema/ProcessorPool.registration Wed Dec 19 12:35:42 2007 +0100 +++ b/schema/ProcessorPool.registration Wed Dec 19 12:44:42 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ProcessorPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_ProcessorPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance +Xen_ProcessorPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_ProcessorPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 98cfb1a1d84a -r b5932d3a178f src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Wed Dec 19 12:35:42 2007 +0100 +++ b/src/Virt_DevicePool.c Wed Dec 19 12:44:42 2007 +0100 @@ -774,7 +774,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_DevicePoolProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_DevicePool, + _BROKER, + libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:58 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:58 +0200 Subject: [Libvirt-cim] [PATCH 07 of 29] LogicalDisk, Memory, NetworkPort, Processor: OpenWbem support In-Reply-To: Message-ID: <8d747cfb847e372b0630.1198070398@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198064992 -3600 # Node ID 8d747cfb847e372b06300dc1abf0e0e2d9653518 # Parent b5932d3a178fad406a082a619d5ad0770b0b5952 LogicalDisk, Memory, NetworkPort, Processor: OpenWbem support - rename provider from DeviceProvider to Device - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r b5932d3a178f -r 8d747cfb847e schema/LogicalDisk.mof --- a/schema/LogicalDisk.mof Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/LogicalDisk.mof Wed Dec 19 12:49:52 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_LogicalDisk to represent " - "the Xen virtual disks on the system.") + "the Xen virtual disks on the system."), + Provider("cmpi::Virt_Device") ] class Xen_LogicalDisk : CIM_LogicalDisk { @@ -10,7 +11,8 @@ class Xen_LogicalDisk : CIM_LogicalDisk [Description ( "A class derived from CIM_LogicalDisk to represent " - "the KVM virtual disks on the system.") + "the KVM virtual disks on the system."), + Provider("cmpi::Virt_Device") ] class KVM_LogicalDisk : CIM_LogicalDisk { diff -r b5932d3a178f -r 8d747cfb847e schema/LogicalDisk.registration --- a/schema/LogicalDisk.registration Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/LogicalDisk.registration Wed Dec 19 12:49:52 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_LogicalDisk root/virt Virt_DeviceProvider Virt_Device instance -KVM_LogicalDisk root/virt Virt_DeviceProvider Virt_Device instance +Xen_LogicalDisk root/virt Virt_Device Virt_Device instance +KVM_LogicalDisk root/virt Virt_Device Virt_Device instance diff -r b5932d3a178f -r 8d747cfb847e schema/Memory.mof --- a/schema/Memory.mof Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/Memory.mof Wed Dec 19 12:49:52 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Memory to represent " - "the Xen virtual memory.") + "the Xen virtual memory."), + Provider("cmpi::Virt_Device") ] class Xen_Memory : CIM_Memory { @@ -10,7 +11,8 @@ class Xen_Memory : CIM_Memory [Description ( "A class derived from CIM_Memory to represent " - "the KVM virtual memory.") + "the KVM virtual memory."), + Provider("cmpi::Virt_Device") ] class KVM_Memory : CIM_Memory { diff -r b5932d3a178f -r 8d747cfb847e schema/Memory.registration --- a/schema/Memory.registration Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/Memory.registration Wed Dec 19 12:49:52 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_Memory root/virt Virt_DeviceProvider Virt_Device instance -KVM_Memory root/virt Virt_DeviceProvider Virt_Device instance +Xen_Memory root/virt Virt_Device Virt_Device instance +KVM_Memory root/virt Virt_Device Virt_Device instance diff -r b5932d3a178f -r 8d747cfb847e schema/NetworkPort.mof --- a/schema/NetworkPort.mof Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/NetworkPort.mof Wed Dec 19 12:49:52 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_NetworkPort to represent " - "the Xen virtual network interfaces on the system.") + "the Xen virtual network interfaces on the system."), + Provider("cmpi::Virt_Device") ] class Xen_NetworkPort : CIM_NetworkPort { @@ -10,7 +11,8 @@ class Xen_NetworkPort : CIM_NetworkPort [Description ( "A class derived from CIM_NetworkPort to represent " - "the KVM virtual network interfaces on the system.") + "the KVM virtual network interfaces on the system."), + Provider("cmpi::Virt_Device") ] class KVM_NetworkPort : CIM_NetworkPort { diff -r b5932d3a178f -r 8d747cfb847e schema/NetworkPort.registration --- a/schema/NetworkPort.registration Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/NetworkPort.registration Wed Dec 19 12:49:52 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_NetworkPort root/virt Virt_DeviceProvider Virt_Device instance -KVM_NetworkPort root/virt Virt_DeviceProvider Virt_Device instance +Xen_NetworkPort root/virt Virt_Device Virt_Device instance +KVM_NetworkPort root/virt Virt_Device Virt_Device instance diff -r b5932d3a178f -r 8d747cfb847e schema/Processor.mof --- a/schema/Processor.mof Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/Processor.mof Wed Dec 19 12:49:52 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Processor to represent " - "the Xen virtual processors.") + "the Xen virtual processors."), + Provider("cmpi::Virt_Device") ] class Xen_Processor : CIM_Processor { @@ -10,7 +11,8 @@ class Xen_Processor : CIM_Processor [Description ( "A class derived from CIM_Processor to represent " - "the KVM virtual processors.") + "the KVM virtual processors."), + Provider("cmpi::Virt_Device") ] class KVM_Processor : CIM_Processor { diff -r b5932d3a178f -r 8d747cfb847e schema/Processor.registration --- a/schema/Processor.registration Wed Dec 19 12:44:42 2007 +0100 +++ b/schema/Processor.registration Wed Dec 19 12:49:52 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_Processor root/virt Virt_DeviceProvider Virt_Device instance -KVM_Processor root/virt Virt_DeviceProvider Virt_Device instance +Xen_Processor root/virt Virt_Device Virt_Device instance +KVM_Processor root/virt Virt_Device Virt_Device instance From heidieck at linux.vnet.ibm.com Wed Dec 19 12:19:59 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:19:59 +0200 Subject: [Libvirt-cim] [PATCH 08 of 29] ElementAllocatedFromPool: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198065181 -3600 # Node ID f621585dee1100d9f3f516c0e74cc982e570919d # Parent 8d747cfb847e372b06300dc1abf0e0e2d9653518 ElementAllocatedFromPool: OpenWbem support - rename provider from ElementAllocatedFromPoolProvider to ElementAllocatedFromPool - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 8d747cfb847e -r f621585dee11 schema/ElementAllocatedFromPool.mof --- a/schema/ElementAllocatedFromPool.mof Wed Dec 19 12:49:52 2007 +0100 +++ b/schema/ElementAllocatedFromPool.mof Wed Dec 19 12:53:01 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_ElementAllocatedFromPool") +] class Xen_ElementAllocatedFromPool : CIM_ElementAllocatedFromPool { }; -[Association] +[Association, + Provider("cmpi::Virt_ElementAllocatedFromPool") +] class KVM_ElementAllocatedFromPool : CIM_ElementAllocatedFromPool { }; diff -r 8d747cfb847e -r f621585dee11 schema/ElementAllocatedFromPool.registration --- a/schema/ElementAllocatedFromPool.registration Wed Dec 19 12:49:52 2007 +0100 +++ b/schema/ElementAllocatedFromPool.registration Wed Dec 19 12:53:01 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association -KVM_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association +Xen_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPool Virt_ElementAllocatedFromPool association +KVM_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPool Virt_ElementAllocatedFromPool association diff -r 8d747cfb847e -r f621585dee11 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Wed Dec 19 12:49:52 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Wed Dec 19 12:53:01 2007 +0100 @@ -311,7 +311,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_ElementAllocatedFromPool, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:01 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:01 +0200 Subject: [Libvirt-cim] [PATCH 10 of 29] ElementConformsToProfile: OpenWbem support In-Reply-To: Message-ID: <361f6304b75b1bbf48d1.1198070401@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198065441 -3600 # Node ID 361f6304b75b1bbf48d1fd8c3454f64e63bdf880 # Parent d91ee8dda3100227e829fb8ab510253cf4c39497 ElementConformsToProfile: OpenWbem support - rename provider from ElementConformsToProfileProvider to ElementConformsToProfile - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r d91ee8dda310 -r 361f6304b75b schema/ElementConformsToProfile.mof --- a/schema/ElementConformsToProfile.mof Wed Dec 19 12:55:06 2007 +0100 +++ b/schema/ElementConformsToProfile.mof Wed Dec 19 12:57:21 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "A class to associate a ManagedElement with its RegisteredProfile.") + "A class to associate a ManagedElement with its RegisteredProfile."), + Provider("cmpi::Virt_ElementConformsToProfile") ] class Xen_ElementConformsToProfile : CIM_ElementConformsToProfile { @@ -14,7 +15,8 @@ class Xen_ElementConformsToProfile : CIM [Association, Description ( - "A class to associate a ManagedElement with its RegisteredProfile.") + "A class to associate a ManagedElement with its RegisteredProfile."), + Provider("cmpi::Virt_ElementConformsToProfile") ] class KVM_ElementConformsToProfile : CIM_ElementConformsToProfile { diff -r d91ee8dda310 -r 361f6304b75b schema/ElementConformsToProfile.registration --- a/schema/ElementConformsToProfile.registration Wed Dec 19 12:55:06 2007 +0100 +++ b/schema/ElementConformsToProfile.registration Wed Dec 19 12:57:21 2007 +0100 @@ -1,6 +1,6 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -#Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association -Xen_ElementConformsToProfile root/interop Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association -#KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association -KVM_ElementConformsToProfile root/interop Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association +#Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +Xen_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +#KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +KVM_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association diff -r d91ee8dda310 -r 361f6304b75b src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Wed Dec 19 12:55:06 2007 +0100 +++ b/src/Virt_ElementConformsToProfile.c Wed Dec 19 12:57:21 2007 +0100 @@ -244,7 +244,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementConformsToProfileProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_ElementConformsToProfile, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: * mode: C From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:00 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:00 +0200 Subject: [Libvirt-cim] [PATCH 09 of 29] ElementCapabilities: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198065306 -3600 # Node ID d91ee8dda3100227e829fb8ab510253cf4c39497 # Parent f621585dee1100d9f3f516c0e74cc982e570919d ElementCapabilities: OpenWbem support - rename provider from ElementCapabilitiesProvider to ElementCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r f621585dee11 -r d91ee8dda310 schema/ElementCapabilities.mof --- a/schema/ElementCapabilities.mof Wed Dec 19 12:53:01 2007 +0100 +++ b/schema/ElementCapabilities.mof Wed Dec 19 12:55:06 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "A class to associate a ManagedElement with its Capabilities.") + "A class to associate a ManagedElement with its Capabilities."), + Provider("cmpi::Virt_ElementCapabilities") ] class Xen_ElementCapabilities : CIM_ElementCapabilities { @@ -10,7 +11,8 @@ class Xen_ElementCapabilities : CIM_Elem [Association, Description ( - "A class to associate a ManagedElement with its Capabilities.") + "A class to associate a ManagedElement with its Capabilities."), + Provider("cmpi::Virt_ElementCapabilities") ] class KVM_ElementCapabilities : CIM_ElementCapabilities { diff -r f621585dee11 -r d91ee8dda310 schema/ElementCapabilities.registration --- a/schema/ElementCapabilities.registration Wed Dec 19 12:53:01 2007 +0100 +++ b/schema/ElementCapabilities.registration Wed Dec 19 12:55:06 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association -KVM_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association +Xen_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association +KVM_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association diff -r f621585dee11 -r d91ee8dda310 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Wed Dec 19 12:53:01 2007 +0100 +++ b/src/Virt_ElementCapabilities.c Wed Dec 19 12:55:06 2007 +0100 @@ -350,7 +350,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_ElementCapabilities, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: * mode: C From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:02 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:02 +0200 Subject: [Libvirt-cim] [PATCH 11 of 29] ElementSettingData: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198065561 -3600 # Node ID d65646ef8cc468fa8e320543edfd54d4907a4e6f # Parent 361f6304b75b1bbf48d1fd8c3454f64e63bdf880 ElementSettingData: OpenWbem support - rename provider from ElementSettingDataProvider to ElementSettingData - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 361f6304b75b -r d65646ef8cc4 schema/ElementSettingData.mof --- a/schema/ElementSettingData.mof Wed Dec 19 12:57:21 2007 +0100 +++ b/schema/ElementSettingData.mof Wed Dec 19 12:59:21 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_ElementSettingData") +] class Xen_ElementSettingData : CIM_ElementSettingData { }; -[Association] +[Association, + Provider("cmpi::Virt_ElementSettingData") +] class KVM_ElementSettingData : CIM_ElementSettingData { }; diff -r 361f6304b75b -r d65646ef8cc4 schema/ElementSettingData.registration --- a/schema/ElementSettingData.registration Wed Dec 19 12:57:21 2007 +0100 +++ b/schema/ElementSettingData.registration Wed Dec 19 12:59:21 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association -KVM_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association +Xen_ElementSettingData root/virt Virt_ElementSettingData Virt_ElementSettingData association +KVM_ElementSettingData root/virt Virt_ElementSettingData Virt_ElementSettingData association diff -r 361f6304b75b -r d65646ef8cc4 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Wed Dec 19 12:57:21 2007 +0100 +++ b/src/Virt_ElementSettingData.c Wed Dec 19 12:59:21 2007 +0100 @@ -216,7 +216,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_ElementSettingData, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:03 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:03 +0200 Subject: [Libvirt-cim] [PATCH 12 of 29] EnabledLogicalElementCapabilities: OpenWbem support In-Reply-To: Message-ID: <75627bcb3851a1df2f93.1198070403@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198065683 -3600 # Node ID 75627bcb3851a1df2f938d5cc92af0f3570a519e # Parent d65646ef8cc468fa8e320543edfd54d4907a4e6f EnabledLogicalElementCapabilities: OpenWbem support - rename provider from EnabledLogicalElementCapabilitiesProvider to EnabledLogicalElementCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r d65646ef8cc4 -r 75627bcb3851 schema/EnabledLogicalElementCapabilities.mof --- a/schema/EnabledLogicalElementCapabilities.mof Wed Dec 19 12:59:21 2007 +0100 +++ b/schema/EnabledLogicalElementCapabilities.mof Wed Dec 19 13:01:23 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Capabilities to represent " - "the changes that can be made to a started Xen virtual system") + "the changes that can be made to a started Xen virtual system"), + Provider("cmpi::Virt_EnabledLogicalElementCapabilities") ] class Xen_EnabledLogicalElementCapabilities : CIM_EnabledLogicalElementCapabilities { @@ -10,7 +11,8 @@ class Xen_EnabledLogicalElementCapabilit [Description ( "A class derived from CIM_Capabilities to represent " - "the changes that can be made to a started KVM virtual system") + "the changes that can be made to a started KVM virtual system"), + Provider("cmpi::Virt_EnabledLogicalElementCapabilities") ] class KVM_EnabledLogicalElementCapabilities : CIM_EnabledLogicalElementCapabilities { diff -r d65646ef8cc4 -r 75627bcb3851 schema/EnabledLogicalElementCapabilities.registration --- a/schema/EnabledLogicalElementCapabilities.registration Wed Dec 19 12:59:21 2007 +0100 +++ b/schema/EnabledLogicalElementCapabilities.registration Wed Dec 19 13:01:23 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilitiesProvider Virt_EnabledLogicalElementCapabilities instance -KVM_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilitiesProvider Virt_EnabledLogicalElementCapabilities instance +Xen_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilities Virt_EnabledLogicalElementCapabilities instance +KVM_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilities Virt_EnabledLogicalElementCapabilities instance diff -r d65646ef8cc4 -r 75627bcb3851 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Wed Dec 19 12:59:21 2007 +0100 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Wed Dec 19 13:01:23 2007 +0100 @@ -234,8 +234,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_EnabledLogicalElementCapabilitiesProvider, _BROKER, - libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_EnabledLogicalElementCapabilities, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:05 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:05 +0200 Subject: [Libvirt-cim] [PATCH 14 of 29] HostedService: OpenWbem support In-Reply-To: Message-ID: <6eacbac6c4c8e8727bb4.1198070405@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198065909 -3600 # Node ID 6eacbac6c4c8e8727bb417197be05716eb1b3859 # Parent 6e52e38ce55e14a89dd459c373664206ebe67394 HostedService: OpenWbem support - rename provider from HostedServiceProvider to HostedService - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 6e52e38ce55e -r 6eacbac6c4c8 schema/HostedService.mof --- a/schema/HostedService.mof Wed Dec 19 13:03:31 2007 +0100 +++ b/schema/HostedService.mof Wed Dec 19 13:05:09 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_HostedService") +] class Xen_HostedService : CIM_HostedService { }; -[Association] +[Association, + Provider("cmpi::Virt_HostedService") +] class KVM_HostedService : CIM_HostedService { }; diff -r 6e52e38ce55e -r 6eacbac6c4c8 schema/HostedService.registration --- a/schema/HostedService.registration Wed Dec 19 13:03:31 2007 +0100 +++ b/schema/HostedService.registration Wed Dec 19 13:05:09 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association -KVM_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association +Xen_HostedService root/virt Virt_HostedService Virt_HostedService association +KVM_HostedService root/virt Virt_HostedService Virt_HostedService association diff -r 6e52e38ce55e -r 6eacbac6c4c8 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Wed Dec 19 13:03:31 2007 +0100 +++ b/src/Virt_HostedService.c Wed Dec 19 13:05:09 2007 +0100 @@ -141,7 +141,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_HostedService, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:07 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:07 +0200 Subject: [Libvirt-cim] [PATCH 16 of 29] RegisteredProfile: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198066581 -3600 # Node ID af0fdc34cdc05deb3d03ddf31713a96007f49284 # Parent 7eee552df9d39221db1b9415c8d237c34aec6867 RegisteredProfile: OpenWbem support - rename provider from RegisteredProfileProvider to RegisteredProfile - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 7eee552df9d3 -r af0fdc34cdc0 schema/RegisteredProfile.mof --- a/schema/RegisteredProfile.mof Wed Dec 19 13:16:20 2007 +0100 +++ b/schema/RegisteredProfile.mof Wed Dec 19 13:16:21 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_RegisteredProfile to represent " - "an advertised conformant profile.") + "an advertised conformant profile."), + Provider("cmpi::Virt_RegisteredProfile") ] class Xen_RegisteredProfile : CIM_RegisteredProfile { @@ -10,7 +11,8 @@ class Xen_RegisteredProfile : CIM_Regist [Description ( "A class derived from CIM_RegisteredProfile to represent " - "an advertised conformant profile.") + "an advertised conformant profile."), + Provider("cmpi::Virt_RegisteredProfile") ] class KVM_RegisteredProfile : CIM_RegisteredProfile { diff -r 7eee552df9d3 -r af0fdc34cdc0 schema/RegisteredProfile.registration --- a/schema/RegisteredProfile.registration Wed Dec 19 13:16:20 2007 +0100 +++ b/schema/RegisteredProfile.registration Wed Dec 19 13:16:21 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_RegisteredProfile root/interop Virt_RegisteredProfileProvider Virt_RegisteredProfile instance -KVM_RegisteredProfile root/interop Virt_RegisteredProfileProvider Virt_RegisteredProfile instance +Xen_RegisteredProfile root/interop Virt_RegisteredProfile Virt_RegisteredProfile instance +KVM_RegisteredProfile root/interop Virt_RegisteredProfile Virt_RegisteredProfile instance diff -r 7eee552df9d3 -r af0fdc34cdc0 src/Virt_RegisteredProfile.c --- a/src/Virt_RegisteredProfile.c Wed Dec 19 13:16:20 2007 +0100 +++ b/src/Virt_RegisteredProfile.c Wed Dec 19 13:16:21 2007 +0100 @@ -197,7 +197,9 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_RegisteredProfileProvider, _BROKER, +STD_InstanceMIStub(, + Virt_RegisteredProfile, + _BROKER, libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:04 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:04 +0200 Subject: [Libvirt-cim] [PATCH 13 of 29] HostedResourcePool: OpenWbem support In-Reply-To: Message-ID: <6e52e38ce55e14a89dd4.1198070404@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198065811 -3600 # Node ID 6e52e38ce55e14a89dd459c373664206ebe67394 # Parent 75627bcb3851a1df2f938d5cc92af0f3570a519e HostedResourcePool: OpenWbem support - rename provider from HostedResourcePoolProvider to HostedResourcePoll - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 75627bcb3851 -r 6e52e38ce55e schema/HostedResourcePool.mof --- a/schema/HostedResourcePool.mof Wed Dec 19 13:01:23 2007 +0100 +++ b/schema/HostedResourcePool.mof Wed Dec 19 13:03:31 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "Associates a host system to its resource pools") + "Associates a host system to its resource pools"), + Provider("cmpi::Virt_HostedResourcePool") ] class Xen_HostedResourcePool : CIM_HostedResourcePool { @@ -10,7 +11,8 @@ class Xen_HostedResourcePool : CIM_Hoste [Association, Description ( - "Associates a host system to its resource pools") + "Associates a host system to its resource pools"), + Provider("cmpi::Virt_HostedResourcePool") ] class KVM_HostedResourcePool : CIM_HostedResourcePool { diff -r 75627bcb3851 -r 6e52e38ce55e schema/HostedResourcePool.registration --- a/schema/HostedResourcePool.registration Wed Dec 19 13:01:23 2007 +0100 +++ b/schema/HostedResourcePool.registration Wed Dec 19 13:03:31 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostedResourcePool root/virt Virt_HostedResourcePoolProvider Virt_HostedResourcePool association -KVM_HostedResourcePool root/virt Virt_HostedResourcePoolProvider Virt_HostedResourcePool association \ No newline at end of file +Xen_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association +KVM_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association \ No newline at end of file diff -r 75627bcb3851 -r 6e52e38ce55e src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Wed Dec 19 13:01:23 2007 +0100 +++ b/src/Virt_HostedResourcePool.c Wed Dec 19 13:03:31 2007 +0100 @@ -155,7 +155,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_HostedResourcePoolProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_HostedResourcePool, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:06 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:06 +0200 Subject: [Libvirt-cim] [PATCH 15 of 29] ResourceAllocationSettingData: OpenWbem support In-Reply-To: Message-ID: <7eee552df9d39221db1b.1198070406@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198066580 -3600 # Node ID 7eee552df9d39221db1b9415c8d237c34aec6867 # Parent 6eacbac6c4c8e8727bb417197be05716eb1b3859 ResourceAllocationSettingData: OpenWbem support - rename provider from RASDProvider to RASD - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 6eacbac6c4c8 -r 7eee552df9d3 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Dec 19 13:05:09 2007 +0100 +++ b/schema/ResourceAllocationSettingData.mof Wed Dec 19 13:16:20 2007 +0100 @@ -8,7 +8,9 @@ class KVM_ResourceAllocationSettingData { }; -[Description ("Xen virtual disk configuration")] +[Description ("Xen virtual disk configuration"), + Provider("cmpi::Virt_RASD") +] class Xen_DiskResourceAllocationSettingData : Xen_ResourceAllocationSettingData { @@ -17,7 +19,9 @@ class Xen_DiskResourceAllocationSettingD }; -[Description ("KVM virtual disk configuration")] +[Description ("KVM virtual disk configuration"), + Provider("cmpi::Virt_RASD") +] class KVM_DiskResourceAllocationSettingData : KVM_ResourceAllocationSettingData { @@ -26,7 +30,9 @@ class KVM_DiskResourceAllocationSettingD }; -[Description ("Xen virtual network configuration")] +[Description ("Xen virtual network configuration"), + Provider("cmpi::Virt_RASD") +] class Xen_NetResourceAllocationSettingData : Xen_ResourceAllocationSettingData { @@ -35,7 +41,9 @@ class Xen_NetResourceAllocationSettingDa }; -[Description ("KVM virtual network configuration")] +[Description ("KVM virtual network configuration"), + Provider("cmpi::Virt_RASD") +] class KVM_NetResourceAllocationSettingData : KVM_ResourceAllocationSettingData { @@ -44,22 +52,30 @@ class KVM_NetResourceAllocationSettingDa }; -[Description ("Xen virtual processor")] +[Description ("Xen virtual processor"), + Provider("cmpi::Virt_RASD") +] class Xen_ProcResourceAllocationSettingData : Xen_ResourceAllocationSettingData { }; -[Description ("KVM virtual processor")] +[Description ("KVM virtual processor"), + Provider("cmpi::Virt_RASD") +] class KVM_ProcResourceAllocationSettingData : KVM_ResourceAllocationSettingData { }; -[Description ("Xen virtual memory")] +[Description ("Xen virtual memory"), + Provider("cmpi::Virt_RASD") +] class Xen_MemResourceAllocationSettingData : Xen_ResourceAllocationSettingData { }; -[Description ("KVM virtual memory")] +[Description ("KVM virtual memory"), + Provider("cmpi::Virt_RASD") +] class KVM_MemResourceAllocationSettingData : KVM_ResourceAllocationSettingData { }; diff -r 6eacbac6c4c8 -r 7eee552df9d3 schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Wed Dec 19 13:05:09 2007 +0100 +++ b/schema/ResourceAllocationSettingData.registration Wed Dec 19 13:16:20 2007 +0100 @@ -1,6 +1,6 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_DiskResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance -Xen_NetResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance -Xen_ProcResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance -Xen_MemResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance +Xen_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +Xen_NetResourceAllocationSettingData root/virt Virt_RASDP Virt_RASD instance +Xen_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +Xen_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r 6eacbac6c4c8 -r 7eee552df9d3 src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Dec 19 13:05:09 2007 +0100 +++ b/src/Virt_RASD.c Wed Dec 19 13:16:20 2007 +0100 @@ -342,7 +342,10 @@ DEFAULT_INST_CLEANUP(); DEFAULT_INST_CLEANUP(); DEFAULT_EQ(); -STD_InstanceMIStub(, Virt_RASDProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_RASD, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:08 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:08 +0200 Subject: [Libvirt-cim] [PATCH 17 of 29] Signed-off-by: Heidi Eckhart In-Reply-To: Message-ID: <7b9de95b191d6d72b114.1198070408@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198066756 -3600 # Node ID 7b9de95b191d6d72b1140e55622e4a5f9ccde81e # Parent af0fdc34cdc05deb3d03ddf31713a96007f49284 Signed-off-by: Heidi Eckhart diff -r af0fdc34cdc0 -r 7b9de95b191d schema/ResourceAllocationFromPool.mof --- a/schema/ResourceAllocationFromPool.mof Wed Dec 19 13:16:21 2007 +0100 +++ b/schema/ResourceAllocationFromPool.mof Wed Dec 19 13:19:16 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_ResourceAllocationFromPool") +] class Xen_ResourceAllocationFromPool : CIM_ResourceAllocationFromPool { }; -[Association] +[Association, + Provider("cmpi::Virt_ResourceAllocationFromPool") +] class KVM_ResourceAllocationFromPool : CIM_ResourceAllocationFromPool { }; diff -r af0fdc34cdc0 -r 7b9de95b191d schema/ResourceAllocationFromPool.registration --- a/schema/ResourceAllocationFromPool.registration Wed Dec 19 13:16:21 2007 +0100 +++ b/schema/ResourceAllocationFromPool.registration Wed Dec 19 13:19:16 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association -KVM_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association \ No newline at end of file +Xen_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPool Virt_ResourceAllocationFromPool association +KVM_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPool Virt_ResourceAllocationFromPool association \ No newline at end of file diff -r af0fdc34cdc0 -r 7b9de95b191d src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Wed Dec 19 13:16:21 2007 +0100 +++ b/src/Virt_ResourceAllocationFromPool.c Wed Dec 19 13:19:16 2007 +0100 @@ -290,7 +290,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_ResourceAllocationFromPool, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:10 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:10 +0200 Subject: [Libvirt-cim] [PATCH 19 of 29] ResourcePoolConfigurationService: OpenWbem support In-Reply-To: Message-ID: <37e5f1fdb2b2eaf926f4.1198070410@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198067173 -3600 # Node ID 37e5f1fdb2b2eaf926f48ac0964364e1223bf28b # Parent 1fd44b737c16ab07487ba08f77f3bbebd30262c3 ResourcePoolConfigurationService: OpenWbem support - rename provider from ResourcePoolConfigurationServiceProvider to ResourcePoolConfigurationService - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 1fd44b737c16 -r 37e5f1fdb2b2 schema/ResourcePoolConfigurationService.mof --- a/schema/ResourcePoolConfigurationService.mof Wed Dec 19 13:24:03 2007 +0100 +++ b/schema/ResourcePoolConfigurationService.mof Wed Dec 19 13:26:13 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_ResourcePoolConfigurationService")] class Xen_ResourcePoolConfigurationService : CIM_ResourcePoolConfigurationService { }; +[Provider("cmpi::Virt_ResourcePoolConfigurationService")] class KVM_ResourcePoolConfigurationService : CIM_ResourcePoolConfigurationService { }; diff -r 1fd44b737c16 -r 37e5f1fdb2b2 schema/ResourcePoolConfigurationService.registration --- a/schema/ResourcePoolConfigurationService.registration Wed Dec 19 13:24:03 2007 +0100 +++ b/schema/ResourcePoolConfigurationService.registration Wed Dec 19 13:26:13 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationServiceProvider Virt_ResourcePoolConfigurationService instance method -KVM_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationServiceProvider Virt_ResourcePoolConfigurationService instance method \ No newline at end of file +Xen_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationService Virt_ResourcePoolConfigurationService instance method +KVM_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationService Virt_ResourcePoolConfigurationService instance method \ No newline at end of file diff -r 1fd44b737c16 -r 37e5f1fdb2b2 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Wed Dec 19 13:24:03 2007 +0100 +++ b/src/Virt_ResourcePoolConfigurationService.c Wed Dec 19 13:26:13 2007 +0100 @@ -205,8 +205,10 @@ static CMPIStatus EnumInstances(CMPIInst } -STD_InstanceMIStub(, Virt_ResourcePoolConfigurationServiceProvider, - _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_ResourcePoolConfigurationService, + _BROKER, + libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:12 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:12 +0200 Subject: [Libvirt-cim] [PATCH 21 of 29] SettingsDefineState: OpenWbem support In-Reply-To: Message-ID: <57e751879fd4d235827c.1198070412@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198067492 -3600 # Node ID 57e751879fd4d235827c9b5a19fc816333c91585 # Parent 5cb22a44b7603b5c1890ed35256b9d3760aabab3 SettingsDefineState: OpenWbem support - rename provider from SettingsDefineStateProvider to SettingsDefineState - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 5cb22a44b760 -r 57e751879fd4 schema/SettingsDefineState.mof --- a/schema/SettingsDefineState.mof Wed Dec 19 13:29:47 2007 +0100 +++ b/schema/SettingsDefineState.mof Wed Dec 19 13:31:32 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineState") +] class Xen_SettingsDefineState : CIM_SettingsDefineState { }; -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineState") +] class KVM_SettingsDefineState : CIM_SettingsDefineState { }; \ No newline at end of file diff -r 5cb22a44b760 -r 57e751879fd4 schema/SettingsDefineState.registration --- a/schema/SettingsDefineState.registration Wed Dec 19 13:29:47 2007 +0100 +++ b/schema/SettingsDefineState.registration Wed Dec 19 13:31:32 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association -KVM_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association +Xen_SettingsDefineState root/virt Virt_SettingsDefineState Virt_SettingsDefineState association +KVM_SettingsDefineState root/virt Virt_SettingsDefineState Virt_SettingsDefineState association diff -r 5cb22a44b760 -r 57e751879fd4 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Wed Dec 19 13:29:47 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Wed Dec 19 13:31:32 2007 +0100 @@ -392,7 +392,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_SettingsDefineState, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:16 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:16 +0200 Subject: [Libvirt-cim] [PATCH 25 of 29] VirtualSystemMigrationCapabilities: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198069815 -3600 # Node ID d7113a165bab3e14235dff949cdf3bad60bb3541 # Parent fe073ec5963b78bd16ed13d54c793e355069921f VirtualSystemMigrationCapabilities: OpenWbem support - rename provider from VSMC to VSMigrationCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r fe073ec5963b -r d7113a165bab schema/VSMigrationCapabilities.mof --- a/schema/VSMigrationCapabilities.mof Wed Dec 19 14:10:15 2007 +0100 +++ b/schema/VSMigrationCapabilities.mof Wed Dec 19 14:10:15 2007 +0100 @@ -10,8 +10,10 @@ class Virt_VirtualSystemMigrationCapabil }; +[Provider("cmpi::Virt_VSMigrationCapabilities")] class Xen_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { }; +[Provider("cmpi::Virt_VSMigrationCapabilities")] class KVM_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { }; diff -r fe073ec5963b -r d7113a165bab schema/VSMigrationCapabilities.registration --- a/schema/VSMigrationCapabilities.registration Wed Dec 19 14:10:15 2007 +0100 +++ b/schema/VSMigrationCapabilities.registration Wed Dec 19 14:10:15 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance -KVM_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance \ No newline at end of file +Xen_VirtualSystemMigrationCapabilities root/virt Virt_VSMigrationCapabilities Virt_VSMigrationCapabilities instance +KVM_VirtualSystemMigrationCapabilities root/virt Virt_VSMigrationCapabilities Virt_VSMigrationCapabilities instance \ No newline at end of file diff -r fe073ec5963b -r d7113a165bab src/Virt_VSMigrationCapabilities.c --- a/src/Virt_VSMigrationCapabilities.c Wed Dec 19 14:10:15 2007 +0100 +++ b/src/Virt_VSMigrationCapabilities.c Wed Dec 19 14:10:15 2007 +0100 @@ -177,7 +177,8 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VSMC, +STD_InstanceMIStub(, + Virt_VSMigrationCapabilities, _BROKER, libvirt_cim_init()); From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:17 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:17 +0200 Subject: [Libvirt-cim] [PATCH 26 of 29] VirtualSystemMigrationService: OpenWbem support In-Reply-To: Message-ID: <0ce468d1f205a5d3e684.1198070417@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198069816 -3600 # Node ID 0ce468d1f205a5d3e6848b0fad21a509c27634e7 # Parent d7113a165bab3e14235dff949cdf3bad60bb3541 VirtualSystemMigrationService: OpenWbem support - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r d7113a165bab -r 0ce468d1f205 schema/VSMigrationService.mof --- a/schema/VSMigrationService.mof Wed Dec 19 14:10:15 2007 +0100 +++ b/schema/VSMigrationService.mof Wed Dec 19 14:10:16 2007 +0100 @@ -36,9 +36,11 @@ class Virt_MigrationJob : CIM_ConcreteJo class Virt_MigrationJob : CIM_ConcreteJob { }; +[Provider("cmpi::Virt_VSMigrationService")] class Xen_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { }; +[Provider("cmpi::Virt_VSMigrationService")] class KVM_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { }; diff -r d7113a165bab -r 0ce468d1f205 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Dec 19 14:10:15 2007 +0100 +++ b/src/Virt_VSMigrationService.c Wed Dec 19 14:10:16 2007 +0100 @@ -751,7 +751,8 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VSMigrationService, +STD_InstanceMIStub(, + Virt_VSMigrationService, _BROKER, libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:11 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:11 +0200 Subject: [Libvirt-cim] [PATCH 20 of 29] SettingsDefineCapabilities: OpenWbem support In-Reply-To: Message-ID: <5cb22a44b7603b5c1890.1198070411@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198067387 -3600 # Node ID 5cb22a44b7603b5c1890ed35256b9d3760aabab3 # Parent 37e5f1fdb2b2eaf926f48ac0964364e1223bf28b SettingsDefineCapabilities: OpenWbem support - rename provider from SettingsDefineCapabilitiesProvider to SettingsDefineCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 37e5f1fdb2b2 -r 5cb22a44b760 schema/SettingsDefineCapabilities.mof --- a/schema/SettingsDefineCapabilities.mof Wed Dec 19 13:26:13 2007 +0100 +++ b/schema/SettingsDefineCapabilities.mof Wed Dec 19 13:29:47 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineCapabilities") +] class Xen_SettingsDefineCapabilities : CIM_SettingsDefineCapabilities { }; -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineCapabilities") +] class KVM_SettingsDefineCapabilities : CIM_SettingsDefineCapabilities { }; diff -r 37e5f1fdb2b2 -r 5cb22a44b760 schema/SettingsDefineCapabilities.registration --- a/schema/SettingsDefineCapabilities.registration Wed Dec 19 13:26:13 2007 +0100 +++ b/schema/SettingsDefineCapabilities.registration Wed Dec 19 13:29:47 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association -KVM_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association +Xen_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilities Virt_SettingsDefineCapabilities association +KVM_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilities Virt_SettingsDefineCapabilities association diff -r 37e5f1fdb2b2 -r 5cb22a44b760 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Dec 19 13:26:13 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Wed Dec 19 13:29:47 2007 +0100 @@ -883,7 +883,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_SettingsDefineCapabilities, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:14 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:14 +0200 Subject: [Libvirt-cim] [PATCH 23 of 29] VirtualSystemManagementCapabilities: OpenWbem support In-Reply-To: Message-ID: <2d83ae41f68fc5ad4bbf.1198070414@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198069814 -3600 # Node ID 2d83ae41f68fc5ad4bbf4aa51a68255422fbf2dd # Parent a2411bdc20ffbea13758137f67321b1ad185a3ee VirtualSystemManagementCapabilities: OpenWbem support - rename provider from VirtualSystemManagementCapabilitiesProvider to VirtualSystemManagementCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r a2411bdc20ff -r 2d83ae41f68f schema/VirtualSystemManagementCapabilities.mof --- a/schema/VirtualSystemManagementCapabilities.mof Wed Dec 19 14:10:11 2007 +0100 +++ b/schema/VirtualSystemManagementCapabilities.mof Wed Dec 19 14:10:14 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Capabilities to represent " - "the management capabilities of a Xen virtual system") + "the management capabilities of a Xen virtual system"), + Provider("cmpi::Virt_VirtualSystemManagementCapabilities") ] class Xen_VirtualSystemManagementCapabilities : CIM_VirtualSystemManagementCapabilities { @@ -10,7 +11,8 @@ class Xen_VirtualSystemManagementCapabil [Description ( "A class derived from CIM_Capabilities to represent " - "the management capabilities of a KVM virtual system.") + "the management capabilities of a KVM virtual system."), + Provider("cmpi::Virt_VirtualSystemManagementCapabilities") ] class KVM_VirtualSystemManagementCapabilities : CIM_VirtualSystemManagementCapabilities { diff -r a2411bdc20ff -r 2d83ae41f68f schema/VirtualSystemManagementCapabilities.registration --- a/schema/VirtualSystemManagementCapabilities.registration Wed Dec 19 14:10:11 2007 +0100 +++ b/schema/VirtualSystemManagementCapabilities.registration Wed Dec 19 14:10:14 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilitiesProvider Virt_VirtualSystemManagementCapabilities instance -KVM_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilitiesProvider Virt_VirtualSystemManagementCapabilities instance +Xen_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilities Virt_VirtualSystemManagementCapabilities instance +KVM_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilities Virt_VirtualSystemManagementCapabilities instance diff -r a2411bdc20ff -r 2d83ae41f68f src/Virt_VirtualSystemManagementCapabilities.c --- a/src/Virt_VirtualSystemManagementCapabilities.c Wed Dec 19 14:10:11 2007 +0100 +++ b/src/Virt_VirtualSystemManagementCapabilities.c Wed Dec 19 14:10:14 2007 +0100 @@ -181,8 +181,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VirtualSystemManagementCapabilitiesProvider, _BROKER, - libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_VirtualSystemManagementCapabilities, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:19 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:19 +0200 Subject: [Libvirt-cim] [PATCH 28 of 29] VirtualSystemSettingDataComponent: OpenWbem support In-Reply-To: Message-ID: <204010b3fe863e9ceee3.1198070419@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198069817 -3600 # Node ID 204010b3fe863e9ceee38fb0761d70bb96e761c4 # Parent b4f86d7e6d2120ce516efde2b2750d85c2c8b5c3 VirtualSystemSettingDataComponent: OpenWbem support - rename provider from VSSDComponentProvider to VSSDComponent - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r b4f86d7e6d21 -r 204010b3fe86 schema/VSSDComponent.mof --- a/schema/VSSDComponent.mof Wed Dec 19 14:10:16 2007 +0100 +++ b/schema/VSSDComponent.mof Wed Dec 19 14:10:17 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_VSSDComponent") +] class Xen_VirtualSystemSettingDataComponent : CIM_Component { }; -[Association] +[Association, + Provider("cmpi::Virt_VSSDComponent") +] class KVM_VirtualSystemSettingDataComponent : CIM_Component { }; diff -r b4f86d7e6d21 -r 204010b3fe86 schema/VSSDComponent.registration --- a/schema/VSSDComponent.registration Wed Dec 19 14:10:16 2007 +0100 +++ b/schema/VSSDComponent.registration Wed Dec 19 14:10:17 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association -KVM_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association +Xen_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponent Virt_VSSDComponent association +KVM_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponent Virt_VSSDComponent association diff -r b4f86d7e6d21 -r 204010b3fe86 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Wed Dec 19 14:10:16 2007 +0100 +++ b/src/Virt_VSSDComponent.c Wed Dec 19 14:10:17 2007 +0100 @@ -210,7 +210,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_VSSDComponent, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:09 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:09 +0200 Subject: [Libvirt-cim] [PATCH 18 of 29] ResourcePoolConfigurationCapabilities: OpenWbem support In-Reply-To: Message-ID: <1fd44b737c16ab07487b.1198070409@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198067043 -3600 # Node ID 1fd44b737c16ab07487ba08f77f3bbebd30262c3 # Parent 7b9de95b191d6d72b1140e55622e4a5f9ccde81e ResourcePoolConfigurationCapabilities: OpenWbem support - rename provider from ResourcePoolConfigurationCapabilitiesProvider to ResourcePoolConfigurationCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 7b9de95b191d -r 1fd44b737c16 schema/ResourcePoolConfigurationCapabilities.mof --- a/schema/ResourcePoolConfigurationCapabilities.mof Wed Dec 19 13:19:16 2007 +0100 +++ b/schema/ResourcePoolConfigurationCapabilities.mof Wed Dec 19 13:24:03 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_ResourcePoolConfigurationCapabilities")] class Xen_ResourcePoolConfigurationCapabilities : CIM_ResourcePoolConfigurationCapabilities { }; +[Provider("cmpi::Virt_ResourcePoolConfigurationCapabilities")] class KVM_ResourcePoolConfigurationCapabilities : CIM_ResourcePoolConfigurationCapabilities { }; diff -r 7b9de95b191d -r 1fd44b737c16 schema/ResourcePoolConfigurationCapabilities.registration --- a/schema/ResourcePoolConfigurationCapabilities.registration Wed Dec 19 13:19:16 2007 +0100 +++ b/schema/ResourcePoolConfigurationCapabilities.registration Wed Dec 19 13:24:03 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilitiesProvider Virt_ResourcePoolConfigurationCapabilities instance -KVM_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilitiesProvider Virt_ResourcePoolConfigurationCapabilities instance \ No newline at end of file +Xen_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilities Virt_ResourcePoolConfigurationCapabilities instance +KVM_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilities Virt_ResourcePoolConfigurationCapabilities instance \ No newline at end of file diff -r 7b9de95b191d -r 1fd44b737c16 src/Virt_ResourcePoolConfigurationCapabilities.c --- a/src/Virt_ResourcePoolConfigurationCapabilities.c Wed Dec 19 13:19:16 2007 +0100 +++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Wed Dec 19 13:24:03 2007 +0100 @@ -118,8 +118,10 @@ static CMPIStatus GetInstance(CMPIInstan } -STD_InstanceMIStub(, Virt_ResourcePoolConfigurationCapabilitiesProvider, - _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_ResourcePoolConfigurationCapabilities, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:15 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:15 +0200 Subject: [Libvirt-cim] [PATCH 24 of 29] VirtualSystemManagementService: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198069815 -3600 # Node ID fe073ec5963b78bd16ed13d54c793e355069921f # Parent 2d83ae41f68fc5ad4bbf4aa51a68255422fbf2dd VirtualSystemManagementService: OpenWbem support - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 2d83ae41f68f -r fe073ec5963b schema/VirtualSystemManagementService.mof --- a/schema/VirtualSystemManagementService.mof Wed Dec 19 14:10:14 2007 +0100 +++ b/schema/VirtualSystemManagementService.mof Wed Dec 19 14:10:15 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_VirtualSystemManagementService")] class Xen_VirtualSystemManagementService : CIM_VirtualSystemManagementService { }; +[Provider("cmpi::Virt_VirtualSystemManagementService")] class KVM_VirtualSystemManagementService : CIM_VirtualSystemManagementService { }; diff -r 2d83ae41f68f -r fe073ec5963b src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Dec 19 14:10:14 2007 +0100 +++ b/src/Virt_VirtualSystemManagementService.c Wed Dec 19 14:10:15 2007 +0100 @@ -1246,7 +1246,9 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VirtualSystemManagementService, _BROKER, +STD_InstanceMIStub(, + Virt_VirtualSystemManagementService, + _BROKER, libvirt_cim_init()); From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:20 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:20 +0200 Subject: [Libvirt-cim] [PATCH 29 of 29] ComputerSystemIndication: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198069818 -3600 # Node ID b64462bb760d425d45257d0a7ab8b075bc518059 # Parent 204010b3fe863e9ceee38fb0761d70bb96e761c4 ComputerSystemIndication: OpenWbem support - rename provider from ComputerSystemIndicationProvider to ComputerSystemIndication - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 204010b3fe86 -r b64462bb760d schema/ComputerSystemIndication.mof --- a/schema/ComputerSystemIndication.mof Wed Dec 19 14:10:17 2007 +0100 +++ b/schema/ComputerSystemIndication.mof Wed Dec 19 14:10:18 2007 +0100 @@ -1,21 +1,29 @@ // Copyright IBM Corp. 2007 -[Description ("Xen_ComputerSystem created")] +[Description ("Xen_ComputerSystem created"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class Xen_ComputerSystemCreatedIndication : CIM_InstCreation { }; -[Description ("Xen_ComputerSystem deleted")] +[Description ("Xen_ComputerSystem deleted"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class Xen_ComputerSystemDeletedIndication : CIM_InstDeletion { }; -[Description ("KVM_ComputerSystem lifecycle")] +[Description ("KVM_ComputerSystem lifecycle"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class KVM_ComputerSystemCreatedIndication : CIM_InstCreation { }; -[Description ("KVM_ComputerSystem lifecycle")] +[Description ("KVM_ComputerSystem lifecycle"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class KVM_ComputerSystemDeletedIndication : CIM_InstDeletion { }; diff -r 204010b3fe86 -r b64462bb760d schema/ComputerSystemIndication.registration --- a/schema/ComputerSystemIndication.registration Wed Dec 19 14:10:17 2007 +0100 +++ b/schema/ComputerSystemIndication.registration Wed Dec 19 14:10:18 2007 +0100 @@ -1,6 +1,6 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method -Xen_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method -KVM_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method -KVM_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method +Xen_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method +Xen_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method +KVM_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method +KVM_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method diff -r 204010b3fe86 -r b64462bb760d src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Wed Dec 19 14:10:17 2007 +0100 +++ b/src/Virt_ComputerSystemIndication.c Wed Dec 19 14:10:18 2007 +0100 @@ -303,8 +303,11 @@ DEFAULT_AF(); DEFAULT_AF(); DEFAULT_MP(); -STDI_IndicationMIStub(, Virt_ComputerSystemIndicationProvider, - _BROKER, libvirt_cim_init(), &csi); +STDI_IndicationMIStub(, + Virt_ComputerSystemIndication, + _BROKER, + libvirt_cim_init(), + &csi); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:13 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:13 +0200 Subject: [Libvirt-cim] [PATCH 22 of 29] SystemDevice: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198069811 -3600 # Node ID a2411bdc20ffbea13758137f67321b1ad185a3ee # Parent 57e751879fd4d235827c9b5a19fc816333c91585 SystemDevice: OpenWbem support - rename provider from SystemDeviceProvider to SystemDevice - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 57e751879fd4 -r a2411bdc20ff schema/SystemDevice.mof --- a/schema/SystemDevice.mof Wed Dec 19 13:31:32 2007 +0100 +++ b/schema/SystemDevice.mof Wed Dec 19 14:10:11 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "A class to associate a Xen_ComputerSystem with its devices." ) + "A class to associate a Xen_ComputerSystem with its devices." ), + Provider("cmpi::Virt_SystemDevice") ] class Xen_SystemDevice : CIM_SystemDevice { @@ -17,7 +18,8 @@ class Xen_SystemDevice : CIM_SystemDevic [Association, Description ( - "A class to associate a KVM_ComputerSystem with its devices." ) + "A class to associate a KVM_ComputerSystem with its devices." ), + Provider("cmpi::Virt_SystemDevice") ] class KVM_SystemDevice : CIM_SystemDevice { diff -r 57e751879fd4 -r a2411bdc20ff schema/SystemDevice.registration --- a/schema/SystemDevice.registration Wed Dec 19 13:31:32 2007 +0100 +++ b/schema/SystemDevice.registration Wed Dec 19 14:10:11 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association -KVM_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association +Xen_SystemDevice root/virt Virt_SystemDevice Virt_SystemDevice association +KVM_SystemDevice root/virt Virt_SystemDevice Virt_SystemDevice association diff -r 57e751879fd4 -r a2411bdc20ff src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Wed Dec 19 13:31:32 2007 +0100 +++ b/src/Virt_SystemDevice.c Wed Dec 19 14:10:11 2007 +0100 @@ -268,7 +268,11 @@ static struct std_assoc *assoc_handlers[ NULL }; -STDA_AssocMIStub(, Virt_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_SystemDevice, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Wed Dec 19 12:20:18 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Wed, 19 Dec 2007 14:20:18 +0200 Subject: [Libvirt-cim] [PATCH 27 of 29] VirtualSystemSettingData: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198069816 -3600 # Node ID b4f86d7e6d2120ce516efde2b2750d85c2c8b5c3 # Parent 0ce468d1f205a5d3e6848b0fad21a509c27634e7 VirtualSystemSettingData: OpenWbem support - rename provider from VSSDProvider to VSSD - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 0ce468d1f205 -r b4f86d7e6d21 schema/VSSD.mof --- a/schema/VSSD.mof Wed Dec 19 14:10:16 2007 +0100 +++ b/schema/VSSD.mof Wed Dec 19 14:10:16 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_VirtualSystemSettingData to represent " - "the config of Xen virtual machines/domains running on the system.") + "the config of Xen virtual machines/domains running on the system."), + Provider("cmpi::Virt_VSSD") ] class Xen_VirtualSystemSettingData : CIM_VirtualSystemSettingData { @@ -14,7 +15,8 @@ class Xen_VirtualSystemSettingData : CIM [Description ( "A class derived from CIM_VirtualSystemSettingData to represent " - "the config of KVM virtual machines/domains running on the system.") + "the config of KVM virtual machines/domains running on the system."), + Provider("cmpi::Virt_VSSD") ] class KVM_VirtualSystemSettingData : CIM_VirtualSystemSettingData { diff -r 0ce468d1f205 -r b4f86d7e6d21 schema/VSSD.registration --- a/schema/VSSD.registration Wed Dec 19 14:10:16 2007 +0100 +++ b/schema/VSSD.registration Wed Dec 19 14:10:16 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemSettingData root/virt Virt_VSSDProvider Virt_VSSD instance -KVM_VirtualSystemSettingData root/virt Virt_VSSDProvider Virt_VSSD instance +Xen_VirtualSystemSettingData root/virt Virt_VSSD Virt_VSSD instance +KVM_VirtualSystemSettingData root/virt Virt_VSSD Virt_VSSD instance diff -r 0ce468d1f205 -r b4f86d7e6d21 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Wed Dec 19 14:10:16 2007 +0100 +++ b/src/Virt_VSSD.c Wed Dec 19 14:10:16 2007 +0100 @@ -250,7 +250,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VSSDProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_VSSD, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From grendel at linux.vnet.ibm.com Wed Dec 19 14:53:46 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Wed, 19 Dec 2007 09:53:46 -0500 Subject: [Libvirt-cim] [PATCH] Change method arg type in VSMS AddResourceSettings In-Reply-To: <58868e43ae199187436f.1197944396@zeit.cn.ibm.com> References: <58868e43ae199187436f.1197944396@zeit.cn.ibm.com> Message-ID: <4769307A.6030602@linux.vnet.ibm.com> lizg at cn.ibm.com wrote: > # HG changeset patch > # User Zhengang Li > # Date 1197944392 -28800 > # Node ID 58868e43ae199187436f1709da9177e4fa0a8f3d > # Parent 72b93a4339e1c13080d6a6d80a580a7742c0b851 > Change method arg type in VSMS AddResourceSettings > > Signed-off-by: Zhengang Li > > diff -r 72b93a4339e1 -r 58868e43ae19 src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Fri Dec 14 10:37:01 2007 +0100 > +++ b/src/Virt_VirtualSystemManagementService.c Tue Dec 18 10:19:52 2007 +0800 > @@ -1076,7 +1076,7 @@ static struct method_handler AddResource > static struct method_handler AddResourceSettings = { > .name = "AddResourceSettings", > .handler = add_resource_settings, > - .args = {{"AffectedConfiguration", CMPI_string}, > + .args = {{"AffectedConfiguration", CMPI_ref}, > {"ResourceSettings", CMPI_stringA}, > ARG_END > } > > Good to have the DCO now, but in the future don't forget that this should get a #2 since it was a resend. Hardly a grievous error on small patch like this, but a good habit to get into. :) -- -Jay From grendel at linux.vnet.ibm.com Wed Dec 19 14:58:18 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Wed, 19 Dec 2007 09:58:18 -0500 Subject: [Libvirt-cim] [PATCH] if statement in state_change() in CS expects incorrect return value In-Reply-To: <6f5ab2a959deeb6e13e8.1197946538@elm3b41.beaverton.ibm.com> References: <6f5ab2a959deeb6e13e8.1197946538@elm3b41.beaverton.ibm.com> Message-ID: <4769318A.5020605@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1197946011 28800 > # Node ID 6f5ab2a959deeb6e13e8f684a014bec9fda36032 > # Parent 8d761c7477e78302fb7dfea2ac6d82cc58974dd5 > if statement in state_change() in CS expects incorrect return value. > > cu_get_u16_arg() returns CMPI_RC_OK upon success. > > Signed-off-by: Kaitlin Rupert > > diff -r 8d761c7477e7 -r 6f5ab2a959de src/Virt_ComputerSystem.c > --- a/src/Virt_ComputerSystem.c Fri Dec 14 16:13:18 2007 -0800 > +++ b/src/Virt_ComputerSystem.c Mon Dec 17 18:46:51 2007 -0800 > @@ -662,7 +662,7 @@ static CMPIStatus state_change(CMPIMetho > const char *name = NULL; > > ret = cu_get_u16_arg(argsin, "RequestedState", &state); > - if (!ret) { > + if (ret != CMPI_RC_OK) { > CMSetStatus(&s, CMPI_RC_ERR_INVALID_PARAMETER); > goto out; > } > > Oops, nice spot! +1 -- -Jay From grendel at linux.vnet.ibm.com Wed Dec 19 15:30:09 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Wed, 19 Dec 2007 10:30:09 -0500 Subject: [Libvirt-cim] [PATCH] Remove error message of trailing backslash in src/Makefile.am In-Reply-To: <133cbb1df893f2d031cb.1198070102@localhost.localdomain> References: <133cbb1df893f2d031cb.1198070102@localhost.localdomain> Message-ID: <47693901.2050404@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1198059368 -3600 > # Node ID 133cbb1df893f2d031cba3534c88936bce69da78 > # Parent 615554f6eca4cd21e5715a3af73a616637e54f96 > Remove error message of trailing backslash in src/Makefile.am > > Running libtool ... > Running aclocal ... > Running autoheader ... > Running automake ... > src/Makefile.am:17: whitespace following trailing backslash > Running autoconf ... > You may now run ./configure > Signed-off-by: Heidi Eckhart > > Always nice to eliminate warnings. +1 -- -Jay From kaitlin at linux.vnet.ibm.com Wed Dec 19 16:28:27 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 19 Dec 2007 08:28:27 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] [RFC] Prepare provider registration and provider name for OpenWbem In-Reply-To: <4768DCAD.8080703@linux.vnet.ibm.com> References: <476808CA.8060405@linux.vnet.ibm.com> <4768DCAD.8080703@linux.vnet.ibm.com> Message-ID: <476946AB.40408@linux.vnet.ibm.com> Heidi Eckhart wrote: >> > This is very close to what the "Provider" qualifier is. Section 2.5.3 > "Optional Qualifiers" of DMTF's DSP0004 "CIM Infrastructure > Specification" v2.3 Final describes it as following: > > The optional qualifiers listed in this table address situations that are > not common to all CIM-compliant implementations. Thus, CIM-compliant > implementations can ignore optional qualifiers since they are not > required to interpret or understand these qualifiers. These are provided > in the specification to avoid random user-defined qualifiers for these > recurring situations. > ... > PROVIDER: An implementation specific handle to the instrumentation that > populates those elements in the schemas that refer to dynamic data. > ... > > OpenWbem makes use of the optional "Provider" qualifier, while Pegasus > and sfcb ignore the qualifier and have their own approach to register > providers. That's why we also need the provider_register script and the > registration files. > Ah, I see. It wasn't clear to me at first what this qualifier was being used for. I get it now though, thanks. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Dec 19 18:04:38 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 19 Dec 2007 10:04:38 -0800 Subject: [Libvirt-cim] [PATCH 00 of 29] Enable libvirt-cim providers for OpenWbem In-Reply-To: References: Message-ID: <47695D36.2030407@linux.vnet.ibm.com> Heidi Eckhart wrote: > updated schema and provider registration scripts > added "Provider" qualifier to each provider's mof > fixed provider and module naming > I tested this set with a Pegasus / Fedora 8 setup. Everything looks good - no regressions on the Pegasus side of things. =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From grendel at linux.vnet.ibm.com Wed Dec 19 20:07:51 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Wed, 19 Dec 2007 15:07:51 -0500 Subject: [Libvirt-cim] [PATCH 00 of 29] Enable libvirt-cim providers for OpenWbem In-Reply-To: <47695D36.2030407@linux.vnet.ibm.com> References: <47695D36.2030407@linux.vnet.ibm.com> Message-ID: <47697A17.2000401@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Heidi Eckhart wrote: >> updated schema and provider registration scripts >> added "Provider" qualifier to each provider's mof >> fixed provider and module naming >> > > I tested this set with a Pegasus / Fedora 8 setup. Everything looks > good - no regressions on the Pegasus side of things. =) > I'd love to test the sfcb side. The slight barrier to that is the complete meltdown of the Pok lab network. I think it was our fault, but the fix requires getting access to a Cisco switch that we aren't going to get, and getting someone else to fix it for us isn't going to speedily. Bottom line is that the only way I can test code right now is physically transporting it into the lab, which doesn't sound too appetizing. I'm hoping that we can get the network back up before that becomes necessary. -- -Jay From danms at us.ibm.com Thu Dec 20 05:13:46 2007 From: danms at us.ibm.com (Dan Smith) Date: Wed, 19 Dec 2007 21:13:46 -0800 Subject: [Libvirt-cim] [PATCH 00 of 29] Enable libvirt-cim providers for OpenWbem References: <47695D36.2030407@linux.vnet.ibm.com> <47697A17.2000401@linux.vnet.ibm.com> Message-ID: <87odcmne2d.fsf@theine.beaverton.ibm.com> JG> I'd love to test the sfcb side. I bet Heidi has tested it on sfcb already. If so, I'm ready to push these in. Thanks Heidi! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From grendel at linux.vnet.ibm.com Thu Dec 20 14:34:07 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 20 Dec 2007 09:34:07 -0500 Subject: [Libvirt-cim] [PATCH 00 of 29] Enable libvirt-cim providers for OpenWbem In-Reply-To: <87odcmne2d.fsf@theine.beaverton.ibm.com> References: <47695D36.2030407@linux.vnet.ibm.com> <47697A17.2000401@linux.vnet.ibm.com> <87odcmne2d.fsf@theine.beaverton.ibm.com> Message-ID: <476A7D5F.8070004@linux.vnet.ibm.com> Dan Smith wrote: > JG> I'd love to test the sfcb side. > > I bet Heidi has tested it on sfcb already. If so, I'm ready to push > these in. > Heh, yea I suppose that's true. Well, it gets my vote. -- -Jay From kaitlin at linux.vnet.ibm.com Thu Dec 20 18:14:59 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 10:14:59 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Replace large if-else in EAFP In-Reply-To: Message-ID: <84eb3549e19956d91268.1198174499@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198174440 28800 # Node ID 84eb3549e19956d912684a09d58631211724a720 # Parent ddf699b9cf98f9258b8959676dcd915b24d25a3d Replace large if-else in EAFP. This can be handled using device_type_from_poolid() instead. Also replaced printf() with CU_DEBUG(). Signed-off-by: Kaitlin Rupert diff -r ddf699b9cf98 -r 84eb3549e199 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Thu Dec 20 10:04:03 2007 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Thu Dec 20 10:14:00 2007 -0800 @@ -31,6 +31,7 @@ #include #include "misc_util.h" #include "cs_util.h" +#include "device_parsing.h" #include "Virt_DevicePool.h" #include "Virt_Device.h" @@ -200,6 +201,7 @@ static CMPIStatus pool_to_vdev(const CMP { const char *poolid; CMPIStatus s = {CMPI_RC_OK, NULL}; + uint16_t type; if (!match_hypervisor_prefix(ref, info)) return s; @@ -211,35 +213,18 @@ static CMPIStatus pool_to_vdev(const CMP goto out; } - printf("Got %s\n", poolid); - - /* FIXME, make this shared with the RAFP version */ - if (STARTS_WITH(poolid, "ProcessorPool")) - devs_from_pool(CIM_RASD_TYPE_PROC, - ref, - poolid, - list); - else if (STARTS_WITH(poolid, "MemoryPool")) - devs_from_pool(CIM_RASD_TYPE_MEM, - ref, - poolid, - list); - else if (STARTS_WITH(poolid, "NetworkPool")) - devs_from_pool(CIM_RASD_TYPE_NET, - ref, - poolid, - list); - else if (STARTS_WITH(poolid, "DiskPool")) - devs_from_pool(CIM_RASD_TYPE_DISK, - ref, - poolid, - list); - else { + CU_DEBUG("Got %s\n", poolid); + + type = device_type_from_poolid(poolid); + if (type == VIRT_DEV_UNKNOWN) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Invalid InstanceID or unsupported pool type"); goto out; } + + + devs_from_pool(type, ref, poolid, list); CMSetStatus(&s, CMPI_RC_OK); From kaitlin at linux.vnet.ibm.com Thu Dec 20 18:14:58 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 10:14:58 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Replace large if-else statement in RAFP In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1198173843 28800 # Node ID ddf699b9cf98f9258b8959676dcd915b24d25a3d # Parent 615554f6eca4cd21e5715a3af73a616637e54f96 Replace large if-else statement in RAFP. This can be handled using device_type_from_poolid() instead. Signed-off-by: Kaitlin Rupert diff -r 615554f6eca4 -r ddf699b9cf98 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Fri Dec 14 16:13:18 2007 -0800 +++ b/src/Virt_ResourceAllocationFromPool.c Thu Dec 20 10:04:03 2007 -0800 @@ -182,6 +182,7 @@ static CMPIStatus pool_to_rasd(const CMP { CMPIStatus s = {CMPI_RC_OK, NULL}; const char *poolid; + uint16_t type; if (!match_hypervisor_prefix(ref, info)) return s; @@ -193,32 +194,19 @@ static CMPIStatus pool_to_rasd(const CMP goto out; } - if (STARTS_WITH(poolid, "ProcessorPool")) - rasds_from_pool(CIM_RASD_TYPE_PROC, - ref, - poolid, - list); - else if (STARTS_WITH(poolid, "MemoryPool")) - rasds_from_pool(CIM_RASD_TYPE_MEM, - ref, - poolid, - list); - else if (STARTS_WITH(poolid, "NetworkPool")) - rasds_from_pool(CIM_RASD_TYPE_NET, - ref, - poolid, - list); - else if (STARTS_WITH(poolid, "DiskPool")) - rasds_from_pool(CIM_RASD_TYPE_DISK, - ref, - poolid, - list); - else { + type = device_type_from_poolid(poolid); + if (type == VIRT_DEV_UNKNOWN) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Invalid InstanceID or unsupported pool type"); goto out; } + + + rasds_from_pool(type, + ref, + poolid, + list); CMSetStatus(&s, CMPI_RC_OK); From kaitlin at linux.vnet.ibm.com Thu Dec 20 18:14:57 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 10:14:57 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Clean up RAFP and EAFP pool_to_* handlers. Message-ID: Both of these handlers use a long if-else statement to determine the resource type. This can be replaced by device_type_from_poolid(). Also replaced a printf() in EAFP with a CU_DEBUG() statement. From grendel at linux.vnet.ibm.com Thu Dec 20 19:32:37 2007 From: grendel at linux.vnet.ibm.com (Jay Gagnon) Date: Thu, 20 Dec 2007 14:32:37 -0500 Subject: [Libvirt-cim] [PATCH 1 of 2] Replace large if-else statement in RAFP In-Reply-To: References: Message-ID: <476AC355.7020607@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1198173843 28800 > # Node ID ddf699b9cf98f9258b8959676dcd915b24d25a3d > # Parent 615554f6eca4cd21e5715a3af73a616637e54f96 > Replace large if-else statement in RAFP. > > This can be handled using device_type_from_poolid() instead. > > Signed-off-by: Kaitlin Rupert > > > Awesome diffstat on this one. :) +1 -- -Jay From heidieck at linux.vnet.ibm.com Thu Dec 20 19:58:10 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 20:58:10 +0100 Subject: [Libvirt-cim] [PATCH 07 of 29] LogicalDisk, Memory, NetworkPort, Processor: OpenWbem support In-Reply-To: <8d747cfb847e372b0630.1198070398@localhost.localdomain> References: <8d747cfb847e372b0630.1198070398@localhost.localdomain> Message-ID: <476AC952.7080002@linux.vnet.ibm.com> Heidi Eckhart wrote: > # HG changeset patch > # User Heidi Eckhart > # Date 1198064992 -3600 > # Node ID 8d747cfb847e372b06300dc1abf0e0e2d9653518 > # Parent b5932d3a178fad406a082a619d5ad0770b0b5952 > LogicalDisk, Memory, NetworkPort, Processor: OpenWbem support > > - rename provider from DeviceProvider to Device > That's not true ... I forgot this step :(. Will fix and resend the patch set. > - update registration file with new providername > - add "Provider" qualifier to mof > Signed-off-by: Heidi Eckhart > > -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Thu Dec 20 20:11:15 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:11:15 +0100 Subject: [Libvirt-cim] [PATCH 00 of 29] Enable libvirt-cim providers for OpenWbem In-Reply-To: <87odcmne2d.fsf@theine.beaverton.ibm.com> References: <47695D36.2030407@linux.vnet.ibm.com> <47697A17.2000401@linux.vnet.ibm.com> <87odcmne2d.fsf@theine.beaverton.ibm.com> Message-ID: <476ACC63.20407@linux.vnet.ibm.com> Dan Smith wrote: > JG> I'd love to test the sfcb side. > > I bet Heidi has tested it on sfcb already. If so, I'm ready to push > these in. > > Thanks Heidi! > > Yes, I did a fast test on sfcb, Pegasus and OpenWbem. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Thu Dec 20 20:22:15 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:22:15 +0100 Subject: [Libvirt-cim] class Virt_VirtualSystemMigrationCapabilities Message-ID: <476ACEF7.2010505@linux.vnet.ibm.com> Hi Dan, the subclass for VirtualSystemMigrationCapabilities in VSMigrationCapabilities.mof has "Virt" as prefix instead of "CIM". Does this has a certain background ? ... class Virt_VirtualSystemMigrationCapabilities : CIM_Capabilities { ... -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck at linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:23 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:23 +0200 Subject: [Libvirt-cim] [PATCH 03 of 29] ComputerSystem: OpenWbem support In-Reply-To: Message-ID: <4de9b4472c5357a0bd51.1198182863@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182617 -3600 # Node ID 4de9b4472c5357a0bd51a26b96e19079e7e7913b # Parent 3a6249849fabbdd217fd0ce0d2f697443c8b27ce ComputerSystem: OpenWbem support - rename provider from ComputerSystemProvider to ComputerSystem - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 3a6249849fab -r 4de9b4472c53 schema/ComputerSystem.mof --- a/schema/ComputerSystem.mof Thu Dec 20 21:30:15 2007 +0100 +++ b/schema/ComputerSystem.mof Thu Dec 20 21:30:17 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_ComputerSystem to represent " - "the Xen virtual machines/domains running on the system.") + "the Xen virtual machines/domains running on the system."), + Provider("cmpi::Virt_ComputerSystem") ] class Xen_ComputerSystem : CIM_ComputerSystem { @@ -14,7 +15,8 @@ class Xen_ComputerSystem : CIM_ComputerS [Description ( "A class derived from CIM_ComputerSystem to represent " - "the KVM virtual machines running on the system.") + "the KVM virtual machines running on the system."), + Provider("cmpi::Virt_ComputerSystem") ] class KVM_ComputerSystem : CIM_ComputerSystem { diff -r 3a6249849fab -r 4de9b4472c53 schema/ComputerSystem.registration --- a/schema/ComputerSystem.registration Thu Dec 20 21:30:15 2007 +0100 +++ b/schema/ComputerSystem.registration Thu Dec 20 21:30:17 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ComputerSystem root/virt Virt_ComputerSystemProvider Virt_ComputerSystem instance method -KVM_ComputerSystem root/virt Virt_ComputerSystemProvider Virt_ComputerSystem instance +Xen_ComputerSystem root/virt Virt_ComputerSystem Virt_ComputerSystem instance method +KVM_ComputerSystem root/virt Virt_ComputerSystem Virt_ComputerSystem instance diff -r 3a6249849fab -r 4de9b4472c53 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Thu Dec 20 21:30:15 2007 +0100 +++ b/src/Virt_ComputerSystem.c Thu Dec 20 21:30:17 2007 +0100 @@ -680,7 +680,10 @@ static CMPIStatus state_change(CMPIMetho return s; } -STD_InstanceMIStub(, Virt_ComputerSystemProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_ComputerSystem, + _BROKER, + libvirt_cim_init()); static struct method_handler RequestStateChange = { .name = "RequestStateChange", @@ -697,7 +700,7 @@ static struct method_handler *my_handler }; STDIM_MethodMIStub(, - Virt_ComputerSystemProvider, + Virt_ComputerSystem, _BROKER, libvirt_cim_init(), my_handlers); From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:26 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:26 +0200 Subject: [Libvirt-cim] [PATCH 06 of 29] DiskPool, MemoryPool, NetPool, ProcessorPool: OpenWbem support In-Reply-To: Message-ID: <165b9b102ac9c2650eda.1198182866@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182618 -3600 # Node ID 165b9b102ac9c2650eda92b18a39991585b33755 # Parent 5cb5f3e499759a36e2c978084e0fc80086952364 DiskPool, MemoryPool, NetPool, ProcessorPool: OpenWbem support - rename provider from DevicePoolProvider to DevicePool - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/DiskPool.mof --- a/schema/DiskPool.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/DiskPool.mof Thu Dec 20 21:30:18 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_DiskPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_DiskPool : CIM_ResourcePool { }; diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/DiskPool.registration --- a/schema/DiskPool.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/DiskPool.registration Thu Dec 20 21:30:18 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_DiskPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_DiskPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance +Xen_DiskPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_DiskPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/MemoryPool.mof --- a/schema/MemoryPool.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/MemoryPool.mof Thu Dec 20 21:30:18 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_MemoryPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_MemoryPool : CIM_ResourcePool { }; diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/MemoryPool.registration --- a/schema/MemoryPool.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/MemoryPool.registration Thu Dec 20 21:30:18 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_MemoryPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_MemoryPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance +Xen_MemoryPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_MemoryPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/NetPool.mof --- a/schema/NetPool.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/NetPool.mof Thu Dec 20 21:30:18 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_NetworkPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_NetworkPool : CIM_ResourcePool { }; diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/NetPool.registration --- a/schema/NetPool.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/NetPool.registration Thu Dec 20 21:30:18 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_NetworkPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_NetworkPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance \ No newline at end of file +Xen_NetworkPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_NetworkPool root/virt Virt_DevicePool Virt_DevicePool instance \ No newline at end of file diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/ProcessorPool.mof --- a/schema/ProcessorPool.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/ProcessorPool.mof Thu Dec 20 21:30:18 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_DevicePool")] class Xen_ProcessorPool : CIM_ResourcePool { }; +[Provider("cmpi::Virt_DevicePool")] class KVM_ProcessorPool : CIM_ResourcePool { }; diff -r 5cb5f3e49975 -r 165b9b102ac9 schema/ProcessorPool.registration --- a/schema/ProcessorPool.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/ProcessorPool.registration Thu Dec 20 21:30:18 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ProcessorPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance -KVM_ProcessorPool root/virt Virt_DevicePoolProvider Virt_DevicePool instance +Xen_ProcessorPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_ProcessorPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 5cb5f3e49975 -r 165b9b102ac9 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Thu Dec 20 21:30:18 2007 +0100 +++ b/src/Virt_DevicePool.c Thu Dec 20 21:30:18 2007 +0100 @@ -774,7 +774,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_DevicePoolProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_DevicePool, + _BROKER, + libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:24 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:24 +0200 Subject: [Libvirt-cim] [PATCH 04 of 29] HostedDependency: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182618 -3600 # Node ID def7d71ec42294a074768f38845a0449520a4e41 # Parent 4de9b4472c5357a0bd51a26b96e19079e7e7913b HostedDependency: OpenWbem support - rename provider from HostedDependencyProvider to HostedDependency - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 4de9b4472c53 -r def7d71ec422 schema/HostedDependency.mof --- a/schema/HostedDependency.mof Thu Dec 20 21:30:17 2007 +0100 +++ b/schema/HostedDependency.mof Thu Dec 20 21:30:18 2007 +0100 @@ -3,7 +3,8 @@ [Association, Description ( "HostedDependency defines a ManagedElement in the context of " - "another ManagedElement in which it resides.") + "another ManagedElement in which it resides."), + Provider("cmpi::Virt_HostedDependency") ] class Xen_HostedDependency : CIM_HostedDependency { @@ -12,7 +13,8 @@ class Xen_HostedDependency : CIM_HostedD [Association, Description ( "HostedDependency defines a ManagedElement in the context of " - "another ManagedElement in which it resides.") + "another ManagedElement in which it resides."), + Provider("cmpi::Virt_HostedDependency") ] class KVM_HostedDependency : CIM_HostedDependency { diff -r 4de9b4472c53 -r def7d71ec422 schema/HostedDependency.registration --- a/schema/HostedDependency.registration Thu Dec 20 21:30:17 2007 +0100 +++ b/schema/HostedDependency.registration Thu Dec 20 21:30:18 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostedDependency root/virt Virt_HostedDependencyProvider Virt_HostedDependency association -KVM_HostedDependency root/virt Virt_HostedDependencyProvider Virt_HostedDependency association +Xen_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association +KVM_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association diff -r 4de9b4472c53 -r def7d71ec422 src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Thu Dec 20 21:30:17 2007 +0100 +++ b/src/Virt_HostedDependency.c Thu Dec 20 21:30:18 2007 +0100 @@ -134,7 +134,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_HostedDependencyProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_HostedDependency, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:27 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:27 +0200 Subject: [Libvirt-cim] [PATCH 07 of 29] LogicalDisk, Memory, NetworkPort, Processor: OpenWbem support In-Reply-To: Message-ID: <9379cc0f82c0c0e78a80.1198182867@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182619 -3600 # Node ID 9379cc0f82c0c0e78a80c1cb721486928b93af66 # Parent 165b9b102ac9c2650eda92b18a39991585b33755 LogicalDisk, Memory, NetworkPort, Processor: OpenWbem support - rename provider from DeviceProvider to Device - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/LogicalDisk.mof --- a/schema/LogicalDisk.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/LogicalDisk.mof Thu Dec 20 21:30:19 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_LogicalDisk to represent " - "the Xen virtual disks on the system.") + "the Xen virtual disks on the system."), + Provider("cmpi::Virt_Device") ] class Xen_LogicalDisk : CIM_LogicalDisk { @@ -10,7 +11,8 @@ class Xen_LogicalDisk : CIM_LogicalDisk [Description ( "A class derived from CIM_LogicalDisk to represent " - "the KVM virtual disks on the system.") + "the KVM virtual disks on the system."), + Provider("cmpi::Virt_Device") ] class KVM_LogicalDisk : CIM_LogicalDisk { diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/LogicalDisk.registration --- a/schema/LogicalDisk.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/LogicalDisk.registration Thu Dec 20 21:30:19 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_LogicalDisk root/virt Virt_DeviceProvider Virt_Device instance -KVM_LogicalDisk root/virt Virt_DeviceProvider Virt_Device instance +Xen_LogicalDisk root/virt Virt_Device Virt_Device instance +KVM_LogicalDisk root/virt Virt_Device Virt_Device instance diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/Memory.mof --- a/schema/Memory.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/Memory.mof Thu Dec 20 21:30:19 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Memory to represent " - "the Xen virtual memory.") + "the Xen virtual memory."), + Provider("cmpi::Virt_Device") ] class Xen_Memory : CIM_Memory { @@ -10,7 +11,8 @@ class Xen_Memory : CIM_Memory [Description ( "A class derived from CIM_Memory to represent " - "the KVM virtual memory.") + "the KVM virtual memory."), + Provider("cmpi::Virt_Device") ] class KVM_Memory : CIM_Memory { diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/Memory.registration --- a/schema/Memory.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/Memory.registration Thu Dec 20 21:30:19 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_Memory root/virt Virt_DeviceProvider Virt_Device instance -KVM_Memory root/virt Virt_DeviceProvider Virt_Device instance +Xen_Memory root/virt Virt_Device Virt_Device instance +KVM_Memory root/virt Virt_Device Virt_Device instance diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/NetworkPort.mof --- a/schema/NetworkPort.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/NetworkPort.mof Thu Dec 20 21:30:19 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_NetworkPort to represent " - "the Xen virtual network interfaces on the system.") + "the Xen virtual network interfaces on the system."), + Provider("cmpi::Virt_Device") ] class Xen_NetworkPort : CIM_NetworkPort { @@ -10,7 +11,8 @@ class Xen_NetworkPort : CIM_NetworkPort [Description ( "A class derived from CIM_NetworkPort to represent " - "the KVM virtual network interfaces on the system.") + "the KVM virtual network interfaces on the system."), + Provider("cmpi::Virt_Device") ] class KVM_NetworkPort : CIM_NetworkPort { diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/NetworkPort.registration --- a/schema/NetworkPort.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/NetworkPort.registration Thu Dec 20 21:30:19 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_NetworkPort root/virt Virt_DeviceProvider Virt_Device instance -KVM_NetworkPort root/virt Virt_DeviceProvider Virt_Device instance +Xen_NetworkPort root/virt Virt_Device Virt_Device instance +KVM_NetworkPort root/virt Virt_Device Virt_Device instance diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/Processor.mof --- a/schema/Processor.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/Processor.mof Thu Dec 20 21:30:19 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Processor to represent " - "the Xen virtual processors.") + "the Xen virtual processors."), + Provider("cmpi::Virt_Device") ] class Xen_Processor : CIM_Processor { @@ -10,7 +11,8 @@ class Xen_Processor : CIM_Processor [Description ( "A class derived from CIM_Processor to represent " - "the KVM virtual processors.") + "the KVM virtual processors."), + Provider("cmpi::Virt_Device") ] class KVM_Processor : CIM_Processor { diff -r 165b9b102ac9 -r 9379cc0f82c0 schema/Processor.registration --- a/schema/Processor.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/Processor.registration Thu Dec 20 21:30:19 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_Processor root/virt Virt_DeviceProvider Virt_Device instance -KVM_Processor root/virt Virt_DeviceProvider Virt_Device instance +Xen_Processor root/virt Virt_Device Virt_Device instance +KVM_Processor root/virt Virt_Device Virt_Device instance diff -r 165b9b102ac9 -r 9379cc0f82c0 src/Virt_Device.c --- a/src/Virt_Device.c Thu Dec 20 21:30:18 2007 +0100 +++ b/src/Virt_Device.c Thu Dec 20 21:30:19 2007 +0100 @@ -546,7 +546,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_DeviceProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_Device, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:28 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:28 +0200 Subject: [Libvirt-cim] [PATCH 08 of 29] ElementAllocatedFromPool: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182619 -3600 # Node ID a5d96949d5736e72957adb8eaa511e4b8d4d7aee # Parent 9379cc0f82c0c0e78a80c1cb721486928b93af66 ElementAllocatedFromPool: OpenWbem support - rename provider from ElementAllocatedFromPoolProvider to ElementAllocatedFromPool - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 9379cc0f82c0 -r a5d96949d573 schema/ElementAllocatedFromPool.mof --- a/schema/ElementAllocatedFromPool.mof Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementAllocatedFromPool.mof Thu Dec 20 21:30:19 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_ElementAllocatedFromPool") +] class Xen_ElementAllocatedFromPool : CIM_ElementAllocatedFromPool { }; -[Association] +[Association, + Provider("cmpi::Virt_ElementAllocatedFromPool") +] class KVM_ElementAllocatedFromPool : CIM_ElementAllocatedFromPool { }; diff -r 9379cc0f82c0 -r a5d96949d573 schema/ElementAllocatedFromPool.registration --- a/schema/ElementAllocatedFromPool.registration Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementAllocatedFromPool.registration Thu Dec 20 21:30:19 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association -KVM_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPoolProvider Virt_ElementAllocatedFromPool association +Xen_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPool Virt_ElementAllocatedFromPool association +KVM_ElementAllocatedFromPool root/virt Virt_ElementAllocatedFromPool Virt_ElementAllocatedFromPool association diff -r 9379cc0f82c0 -r a5d96949d573 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Thu Dec 20 21:30:19 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Thu Dec 20 21:30:19 2007 +0100 @@ -311,7 +311,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementAllocatedFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_ElementAllocatedFromPool, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:31 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:31 +0200 Subject: [Libvirt-cim] [PATCH 11 of 29] ElementSettingData: OpenWbem support In-Reply-To: Message-ID: <1ca174e0f16ec42e34ba.1198182871@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182620 -3600 # Node ID 1ca174e0f16ec42e34ba605c5108d0e484072265 # Parent d4e7585a3f53a347b655f74ff9948d2cec5e6aa0 ElementSettingData: OpenWbem support - rename provider from ElementSettingDataProvider to ElementSettingData - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r d4e7585a3f53 -r 1ca174e0f16e schema/ElementSettingData.mof --- a/schema/ElementSettingData.mof Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementSettingData.mof Thu Dec 20 21:30:20 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_ElementSettingData") +] class Xen_ElementSettingData : CIM_ElementSettingData { }; -[Association] +[Association, + Provider("cmpi::Virt_ElementSettingData") +] class KVM_ElementSettingData : CIM_ElementSettingData { }; diff -r d4e7585a3f53 -r 1ca174e0f16e schema/ElementSettingData.registration --- a/schema/ElementSettingData.registration Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementSettingData.registration Thu Dec 20 21:30:20 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association -KVM_ElementSettingData root/virt Virt_ElementSettingDataProvider Virt_ElementSettingData association +Xen_ElementSettingData root/virt Virt_ElementSettingData Virt_ElementSettingData association +KVM_ElementSettingData root/virt Virt_ElementSettingData Virt_ElementSettingData association diff -r d4e7585a3f53 -r 1ca174e0f16e src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Thu Dec 20 21:30:19 2007 +0100 +++ b/src/Virt_ElementSettingData.c Thu Dec 20 21:30:20 2007 +0100 @@ -216,7 +216,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementSettingDataProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_ElementSettingData, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:32 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:32 +0200 Subject: [Libvirt-cim] [PATCH 12 of 29] EnabledLogicalElementCapabilities: OpenWbem support In-Reply-To: Message-ID: <740a16ad1a14660da0aa.1198182872@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182620 -3600 # Node ID 740a16ad1a14660da0aa1668ae2ef36f0ab2400a # Parent 1ca174e0f16ec42e34ba605c5108d0e484072265 EnabledLogicalElementCapabilities: OpenWbem support - rename provider from EnabledLogicalElementCapabilitiesProvider to EnabledLogicalElementCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 1ca174e0f16e -r 740a16ad1a14 schema/EnabledLogicalElementCapabilities.mof --- a/schema/EnabledLogicalElementCapabilities.mof Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/EnabledLogicalElementCapabilities.mof Thu Dec 20 21:30:20 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Capabilities to represent " - "the changes that can be made to a started Xen virtual system") + "the changes that can be made to a started Xen virtual system"), + Provider("cmpi::Virt_EnabledLogicalElementCapabilities") ] class Xen_EnabledLogicalElementCapabilities : CIM_EnabledLogicalElementCapabilities { @@ -10,7 +11,8 @@ class Xen_EnabledLogicalElementCapabilit [Description ( "A class derived from CIM_Capabilities to represent " - "the changes that can be made to a started KVM virtual system") + "the changes that can be made to a started KVM virtual system"), + Provider("cmpi::Virt_EnabledLogicalElementCapabilities") ] class KVM_EnabledLogicalElementCapabilities : CIM_EnabledLogicalElementCapabilities { diff -r 1ca174e0f16e -r 740a16ad1a14 schema/EnabledLogicalElementCapabilities.registration --- a/schema/EnabledLogicalElementCapabilities.registration Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/EnabledLogicalElementCapabilities.registration Thu Dec 20 21:30:20 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilitiesProvider Virt_EnabledLogicalElementCapabilities instance -KVM_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilitiesProvider Virt_EnabledLogicalElementCapabilities instance +Xen_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilities Virt_EnabledLogicalElementCapabilities instance +KVM_EnabledLogicalElementCapabilities root/virt Virt_EnabledLogicalElementCapabilities Virt_EnabledLogicalElementCapabilities instance diff -r 1ca174e0f16e -r 740a16ad1a14 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Thu Dec 20 21:30:20 2007 +0100 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Thu Dec 20 21:30:20 2007 +0100 @@ -234,8 +234,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_EnabledLogicalElementCapabilitiesProvider, _BROKER, - libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_EnabledLogicalElementCapabilities, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:20 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:20 +0200 Subject: [Libvirt-cim] [PATCH 00 of 29] #2 - Enable libvirt-cim providers for OpenWbem Message-ID: updated schema and provider registration scripts added "Provider" qualifier to each provider's mof fixed provider and module naming Diff to #1: - patch 1: registration for interop namespace must be root/interop instead of /root/interop for OpenWbem - patch 7: forgot to rename provider in src file - patch 17: fixed hg header - patch 19: forgot to rename provider of MethodMI From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:34 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:34 +0200 Subject: [Libvirt-cim] [PATCH 14 of 29] HostedService: OpenWbem support In-Reply-To: Message-ID: <6d1e90a790bb8f1989e1.1198182874@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182620 -3600 # Node ID 6d1e90a790bb8f1989e1da30f093457a06d2792b # Parent eab9a00f1fd87ccd79ffeaabfa19a062a5ce9516 HostedService: OpenWbem support - rename provider from HostedServiceProvider to HostedService - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r eab9a00f1fd8 -r 6d1e90a790bb schema/HostedService.mof --- a/schema/HostedService.mof Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/HostedService.mof Thu Dec 20 21:30:20 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_HostedService") +] class Xen_HostedService : CIM_HostedService { }; -[Association] +[Association, + Provider("cmpi::Virt_HostedService") +] class KVM_HostedService : CIM_HostedService { }; diff -r eab9a00f1fd8 -r 6d1e90a790bb schema/HostedService.registration --- a/schema/HostedService.registration Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/HostedService.registration Thu Dec 20 21:30:20 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association -KVM_HostedService root/virt Virt_HostedServiceProvider Virt_HostedService association +Xen_HostedService root/virt Virt_HostedService Virt_HostedService association +KVM_HostedService root/virt Virt_HostedService Virt_HostedService association diff -r eab9a00f1fd8 -r 6d1e90a790bb src/Virt_HostedService.c --- a/src/Virt_HostedService.c Thu Dec 20 21:30:20 2007 +0100 +++ b/src/Virt_HostedService.c Thu Dec 20 21:30:20 2007 +0100 @@ -141,7 +141,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_HostedServiceProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_HostedService, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:33 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:33 +0200 Subject: [Libvirt-cim] [PATCH 13 of 29] HostedResourcePool: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182620 -3600 # Node ID eab9a00f1fd87ccd79ffeaabfa19a062a5ce9516 # Parent 740a16ad1a14660da0aa1668ae2ef36f0ab2400a HostedResourcePool: OpenWbem support - rename provider from HostedResourcePoolProvider to HostedResourcePoll - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 740a16ad1a14 -r eab9a00f1fd8 schema/HostedResourcePool.mof --- a/schema/HostedResourcePool.mof Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/HostedResourcePool.mof Thu Dec 20 21:30:20 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "Associates a host system to its resource pools") + "Associates a host system to its resource pools"), + Provider("cmpi::Virt_HostedResourcePool") ] class Xen_HostedResourcePool : CIM_HostedResourcePool { @@ -10,7 +11,8 @@ class Xen_HostedResourcePool : CIM_Hoste [Association, Description ( - "Associates a host system to its resource pools") + "Associates a host system to its resource pools"), + Provider("cmpi::Virt_HostedResourcePool") ] class KVM_HostedResourcePool : CIM_HostedResourcePool { diff -r 740a16ad1a14 -r eab9a00f1fd8 schema/HostedResourcePool.registration --- a/schema/HostedResourcePool.registration Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/HostedResourcePool.registration Thu Dec 20 21:30:20 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostedResourcePool root/virt Virt_HostedResourcePoolProvider Virt_HostedResourcePool association -KVM_HostedResourcePool root/virt Virt_HostedResourcePoolProvider Virt_HostedResourcePool association \ No newline at end of file +Xen_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association +KVM_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association \ No newline at end of file diff -r 740a16ad1a14 -r eab9a00f1fd8 src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Thu Dec 20 21:30:20 2007 +0100 +++ b/src/Virt_HostedResourcePool.c Thu Dec 20 21:30:20 2007 +0100 @@ -155,7 +155,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_HostedResourcePoolProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_HostedResourcePool, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:35 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:35 +0200 Subject: [Libvirt-cim] [PATCH 15 of 29] ResourceAllocationSettingData: OpenWbem support In-Reply-To: Message-ID: <2ca0648a068045d57f13.1198182875@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182621 -3600 # Node ID 2ca0648a068045d57f1329bab6f78ecf2dff8588 # Parent 6d1e90a790bb8f1989e1da30f093457a06d2792b ResourceAllocationSettingData: OpenWbem support - rename provider from RASDProvider to RASD - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 6d1e90a790bb -r 2ca0648a0680 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/ResourceAllocationSettingData.mof Thu Dec 20 21:30:21 2007 +0100 @@ -8,7 +8,9 @@ class KVM_ResourceAllocationSettingData { }; -[Description ("Xen virtual disk configuration")] +[Description ("Xen virtual disk configuration"), + Provider("cmpi::Virt_RASD") +] class Xen_DiskResourceAllocationSettingData : Xen_ResourceAllocationSettingData { @@ -17,7 +19,9 @@ class Xen_DiskResourceAllocationSettingD }; -[Description ("KVM virtual disk configuration")] +[Description ("KVM virtual disk configuration"), + Provider("cmpi::Virt_RASD") +] class KVM_DiskResourceAllocationSettingData : KVM_ResourceAllocationSettingData { @@ -26,7 +30,9 @@ class KVM_DiskResourceAllocationSettingD }; -[Description ("Xen virtual network configuration")] +[Description ("Xen virtual network configuration"), + Provider("cmpi::Virt_RASD") +] class Xen_NetResourceAllocationSettingData : Xen_ResourceAllocationSettingData { @@ -35,7 +41,9 @@ class Xen_NetResourceAllocationSettingDa }; -[Description ("KVM virtual network configuration")] +[Description ("KVM virtual network configuration"), + Provider("cmpi::Virt_RASD") +] class KVM_NetResourceAllocationSettingData : KVM_ResourceAllocationSettingData { @@ -44,22 +52,30 @@ class KVM_NetResourceAllocationSettingDa }; -[Description ("Xen virtual processor")] +[Description ("Xen virtual processor"), + Provider("cmpi::Virt_RASD") +] class Xen_ProcResourceAllocationSettingData : Xen_ResourceAllocationSettingData { }; -[Description ("KVM virtual processor")] +[Description ("KVM virtual processor"), + Provider("cmpi::Virt_RASD") +] class KVM_ProcResourceAllocationSettingData : KVM_ResourceAllocationSettingData { }; -[Description ("Xen virtual memory")] +[Description ("Xen virtual memory"), + Provider("cmpi::Virt_RASD") +] class Xen_MemResourceAllocationSettingData : Xen_ResourceAllocationSettingData { }; -[Description ("KVM virtual memory")] +[Description ("KVM virtual memory"), + Provider("cmpi::Virt_RASD") +] class KVM_MemResourceAllocationSettingData : KVM_ResourceAllocationSettingData { }; diff -r 6d1e90a790bb -r 2ca0648a0680 schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Thu Dec 20 21:30:20 2007 +0100 +++ b/schema/ResourceAllocationSettingData.registration Thu Dec 20 21:30:21 2007 +0100 @@ -1,6 +1,6 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_DiskResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance -Xen_NetResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance -Xen_ProcResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance -Xen_MemResourceAllocationSettingData root/virt Virt_RASDProvider Virt_RASD instance +Xen_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +Xen_NetResourceAllocationSettingData root/virt Virt_RASDP Virt_RASD instance +Xen_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +Xen_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r 6d1e90a790bb -r 2ca0648a0680 src/Virt_RASD.c --- a/src/Virt_RASD.c Thu Dec 20 21:30:20 2007 +0100 +++ b/src/Virt_RASD.c Thu Dec 20 21:30:21 2007 +0100 @@ -342,7 +342,10 @@ DEFAULT_INST_CLEANUP(); DEFAULT_INST_CLEANUP(); DEFAULT_EQ(); -STD_InstanceMIStub(, Virt_RASDProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_RASD, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:22 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:22 +0200 Subject: [Libvirt-cim] [PATCH 02 of 29] HostSystem: OpenWbem support In-Reply-To: Message-ID: <3a6249849fabbdd217fd.1198182862@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182615 -3600 # Node ID 3a6249849fabbdd217fd0ce0d2f697443c8b27ce # Parent 6d6ab1dddcdc4835de7c492635f531ed4797a736 HostSystem: OpenWbem support - rename provider from HostSystemProvider to HostSystem - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 6d6ab1dddcdc -r 3a6249849fab schema/HostSystem.mof --- a/schema/HostSystem.mof Thu Dec 20 21:30:11 2007 +0100 +++ b/schema/HostSystem.mof Thu Dec 20 21:30:15 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_ComputerSystem to represent " - "the Xen host system.") + "the Xen host system."), + Provider("cmpi::Virt_HostSystem") ] class Xen_HostSystem : CIM_ComputerSystem { @@ -10,7 +11,8 @@ class Xen_HostSystem : CIM_ComputerSyste [Description ( "A class derived from CIM_ComputerSystem to represent " - "the KVM host system.") + "the KVM host system."), + Provider("cmpi::Virt_HostSystem") ] class KVM_HostSystem : CIM_ComputerSystem { diff -r 6d6ab1dddcdc -r 3a6249849fab schema/HostSystem.registration --- a/schema/HostSystem.registration Thu Dec 20 21:30:11 2007 +0100 +++ b/schema/HostSystem.registration Thu Dec 20 21:30:15 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_HostSystem root/virt Virt_HostSystemProvider Virt_HostSystem instance -KVM_HostSystem root/virt Virt_HostSystemProvider Virt_HostSystem instance +Xen_HostSystem root/virt Virt_HostSystem Virt_HostSystem instance +KVM_HostSystem root/virt Virt_HostSystem Virt_HostSystem instance diff -r 6d6ab1dddcdc -r 3a6249849fab src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Thu Dec 20 21:30:11 2007 +0100 +++ b/src/Virt_HostSystem.c Thu Dec 20 21:30:15 2007 +0100 @@ -173,7 +173,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_HostSystemProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_HostSystem, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:38 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:38 +0200 Subject: [Libvirt-cim] [PATCH 18 of 29] ResourcePoolConfigurationCapabilities: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182621 -3600 # Node ID ce05dd1d69bd87665a7016daea808cad2f32588d # Parent 1c5cfb9f21a045788eac5b090b7a64ab31d79541 ResourcePoolConfigurationCapabilities: OpenWbem support - rename provider from ResourcePoolConfigurationCapabilitiesProvider to ResourcePoolConfigurationCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 1c5cfb9f21a0 -r ce05dd1d69bd schema/ResourcePoolConfigurationCapabilities.mof --- a/schema/ResourcePoolConfigurationCapabilities.mof Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/ResourcePoolConfigurationCapabilities.mof Thu Dec 20 21:30:21 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_ResourcePoolConfigurationCapabilities")] class Xen_ResourcePoolConfigurationCapabilities : CIM_ResourcePoolConfigurationCapabilities { }; +[Provider("cmpi::Virt_ResourcePoolConfigurationCapabilities")] class KVM_ResourcePoolConfigurationCapabilities : CIM_ResourcePoolConfigurationCapabilities { }; diff -r 1c5cfb9f21a0 -r ce05dd1d69bd schema/ResourcePoolConfigurationCapabilities.registration --- a/schema/ResourcePoolConfigurationCapabilities.registration Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/ResourcePoolConfigurationCapabilities.registration Thu Dec 20 21:30:21 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilitiesProvider Virt_ResourcePoolConfigurationCapabilities instance -KVM_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilitiesProvider Virt_ResourcePoolConfigurationCapabilities instance \ No newline at end of file +Xen_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilities Virt_ResourcePoolConfigurationCapabilities instance +KVM_ResourcePoolConfigurationCapabilities root/virt Virt_ResourcePoolConfigurationCapabilities Virt_ResourcePoolConfigurationCapabilities instance \ No newline at end of file diff -r 1c5cfb9f21a0 -r ce05dd1d69bd src/Virt_ResourcePoolConfigurationCapabilities.c --- a/src/Virt_ResourcePoolConfigurationCapabilities.c Thu Dec 20 21:30:21 2007 +0100 +++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Thu Dec 20 21:30:21 2007 +0100 @@ -118,8 +118,10 @@ static CMPIStatus GetInstance(CMPIInstan } -STD_InstanceMIStub(, Virt_ResourcePoolConfigurationCapabilitiesProvider, - _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_ResourcePoolConfigurationCapabilities, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:21 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:21 +0200 Subject: [Libvirt-cim] [PATCH 01 of 29] Added installation support for openWbem In-Reply-To: Message-ID: <6d6ab1dddcdc4835de7c.1198182861@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182611 -3600 # Node ID 6d6ab1dddcdc4835de7c492635f531ed4797a736 # Parent 133cbb1df893f2d031cba3534c88936bce69da78 Added installation support for openWbem Signed-off-by: Heidi Eckhart diff -r 133cbb1df893 -r 6d6ab1dddcdc Makefile.am --- a/Makefile.am Wed Dec 19 11:16:08 2007 +0100 +++ b/Makefile.am Thu Dec 20 21:30:11 2007 +0100 @@ -96,11 +96,11 @@ preinstall: # @CIMSERVER@ is set by the configure script postinstall: sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) - sh provider-register.sh -v -t @CIMSERVER@ -n /root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) preuninstall: sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) - sh provider-register.sh -v -d -t @CIMSERVER@ -n /root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) diff -r 133cbb1df893 -r 6d6ab1dddcdc base_schema/install_base_schema.sh.in --- a/base_schema/install_base_schema.sh.in Wed Dec 19 11:16:08 2007 +0100 +++ b/base_schema/install_base_schema.sh.in Thu Dec 20 21:30:11 2007 +0100 @@ -3,6 +3,7 @@ DATA="$1" DATA="$1" NS=@CIM_VIRT_NS@ CIMOM=@CIMSERVER@ +SCHEMA_VERSION="2.16" TMPDIR=$(mktemp -d /tmp/cim_schema.XXXXX) @@ -44,6 +45,17 @@ detect_sfcb_dir() { done } +detect_openwbem_dir() { + dirs="/usr/share/mof" + + for d in $dirs; do + if [ -d "$d" ]; then + echo $d + return + fi + done +} + install_schema_pegasus() { local repo=$(detect_peg_repo) @@ -76,6 +88,26 @@ install_schema_sfcb() { sfcbrepos -f } +install_schema_openwbem() { + local dir=$(detect_openwbem_dir) + local schema_dir=$dir/cimv$SCHEMA_VERSION + + mkdir $schema_dir + if [ -d "$schema_dir" ]; then + echo "Unable to determine openwbem schema directory" + return + fi + + cp ${TMPDIR}/cimv???.mof ${TMPDIR}/CIM_Schema.mof + cp -ra ${TMPDIR}/* $schema_dir + + owcreatenamespace -u http://localhost/ -n root/virt + owmofc -u http://localhost/cimom -n root/virt $schema_dir/CIM_Schema.mof + + owcreatenamespace -u http://localhost/ -n root/interop + owmofc -u http://localhost/cimom -n root/interop $schema_dir/cimv???-interop.mof +} + if [ -z "$1" ]; then echo "Usage: $0 [source_dir]" exit 1 @@ -91,6 +123,9 @@ case "$CIMOM" in pegasus) (install_schema_pegasus) >>$DEBUG 2>&1 ;; + openwbem) + (install_schema_openwbem) >>$DEBUG 2>&1 + ;; *) echo ERROR: Unknown CIMOM: $CIMOM ;; diff -r 133cbb1df893 -r 6d6ab1dddcdc provider-register.sh --- a/provider-register.sh Wed Dec 19 11:16:08 2007 +0100 +++ b/provider-register.sh Thu Dec 20 21:30:11 2007 +0100 @@ -477,7 +477,7 @@ openwbem_transform() then for _f in $moffiles do - sed "s/Provider *( *\"cmpi:/Provider(\"cmpi::/g" < $_f >> $OUTFILE + cat $_f >> $OUTFILE done fi } @@ -497,6 +497,9 @@ openwbem_repository() openwbem_install() { + namespace=$1 + shift + CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then @@ -531,7 +534,7 @@ openwbem_install() if openwbem_transform $_REGFILENAME $* then chatter Registering providers with $state owcimomd - $CIMMOF $_REGFILENAME > /dev/null + $CIMMOF -u http://localhost/cimom -n $namespace $_REGFILENAME > /dev/null else echo "Failed to build OpenWBEM registration MOF." >&2 return 1 @@ -540,6 +543,9 @@ openwbem_install() openwbem_uninstall() { + namespace=$1 + shift + CIMMOF=`which owmofc 2> /dev/null` if test $? != 0 then @@ -728,7 +734,7 @@ then case $cimserver in pegasus) pegasus_install $namespace $mofs ":" $regs;; sfcb) sfcb_install $namespace $mofs ":" $regs;; - openwbem) openwbem_install $mofs ;; + openwbem) openwbem_install $namespace $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac @@ -736,7 +742,7 @@ else case $cimserver in pegasus) pegasus_uninstall $namespace $mofs ":" $regs;; sfcb) sfcb_uninstall $namespace $mofs ":" $regs;; - openwbem) openwbem_uninstall $mofs ;; + openwbem) openwbem_uninstall $namespace $mofs ;; sniacimom) echo sniacimom not yet supported && exit 1 ;; **) echo "Invalid CIM Server Type " $cimserver && exit 1;; esac From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:39 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:39 +0200 Subject: [Libvirt-cim] [PATCH 19 of 29] ResourcePoolConfigurationService: OpenWbem support In-Reply-To: Message-ID: <0402e7a5877b079efbb5.1198182879@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182622 -3600 # Node ID 0402e7a5877b079efbb53f255da290d095d6890f # Parent ce05dd1d69bd87665a7016daea808cad2f32588d ResourcePoolConfigurationService: OpenWbem support - rename provider from ResourcePoolConfigurationServiceProvider to ResourcePoolConfigurationService - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r ce05dd1d69bd -r 0402e7a5877b schema/ResourcePoolConfigurationService.mof --- a/schema/ResourcePoolConfigurationService.mof Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/ResourcePoolConfigurationService.mof Thu Dec 20 21:30:22 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_ResourcePoolConfigurationService")] class Xen_ResourcePoolConfigurationService : CIM_ResourcePoolConfigurationService { }; +[Provider("cmpi::Virt_ResourcePoolConfigurationService")] class KVM_ResourcePoolConfigurationService : CIM_ResourcePoolConfigurationService { }; diff -r ce05dd1d69bd -r 0402e7a5877b schema/ResourcePoolConfigurationService.registration --- a/schema/ResourcePoolConfigurationService.registration Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/ResourcePoolConfigurationService.registration Thu Dec 20 21:30:22 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationServiceProvider Virt_ResourcePoolConfigurationService instance method -KVM_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationServiceProvider Virt_ResourcePoolConfigurationService instance method \ No newline at end of file +Xen_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationService Virt_ResourcePoolConfigurationService instance method +KVM_ResourcePoolConfigurationService root/virt Virt_ResourcePoolConfigurationService Virt_ResourcePoolConfigurationService instance method \ No newline at end of file diff -r ce05dd1d69bd -r 0402e7a5877b src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Thu Dec 20 21:30:21 2007 +0100 +++ b/src/Virt_ResourcePoolConfigurationService.c Thu Dec 20 21:30:22 2007 +0100 @@ -82,8 +82,11 @@ static struct method_handler *my_handler NULL, }; -STDIM_MethodMIStub(, Virt_ResourcePoolConfigurationServiceProvider, - _BROKER, libvirt_cim_init(), my_handlers); +STDIM_MethodMIStub(, + Virt_ResourcePoolConfigurationService, + _BROKER, + libvirt_cim_init(), + my_handlers); DEFAULT_CI(); DEFAULT_MI(); @@ -205,8 +208,10 @@ static CMPIStatus EnumInstances(CMPIInst } -STD_InstanceMIStub(, Virt_ResourcePoolConfigurationServiceProvider, - _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_ResourcePoolConfigurationService, + _BROKER, + libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:30 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:30 +0200 Subject: [Libvirt-cim] [PATCH 10 of 29] ElementConformsToProfile: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182619 -3600 # Node ID d4e7585a3f53a347b655f74ff9948d2cec5e6aa0 # Parent fdba4d9de9660421b2cb1749951404ed5aa8bdaa ElementConformsToProfile: OpenWbem support - rename provider from ElementConformsToProfileProvider to ElementConformsToProfile - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r fdba4d9de966 -r d4e7585a3f53 schema/ElementConformsToProfile.mof --- a/schema/ElementConformsToProfile.mof Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementConformsToProfile.mof Thu Dec 20 21:30:19 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "A class to associate a ManagedElement with its RegisteredProfile.") + "A class to associate a ManagedElement with its RegisteredProfile."), + Provider("cmpi::Virt_ElementConformsToProfile") ] class Xen_ElementConformsToProfile : CIM_ElementConformsToProfile { @@ -14,7 +15,8 @@ class Xen_ElementConformsToProfile : CIM [Association, Description ( - "A class to associate a ManagedElement with its RegisteredProfile.") + "A class to associate a ManagedElement with its RegisteredProfile."), + Provider("cmpi::Virt_ElementConformsToProfile") ] class KVM_ElementConformsToProfile : CIM_ElementConformsToProfile { diff -r fdba4d9de966 -r d4e7585a3f53 schema/ElementConformsToProfile.registration --- a/schema/ElementConformsToProfile.registration Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementConformsToProfile.registration Thu Dec 20 21:30:19 2007 +0100 @@ -1,6 +1,6 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -#Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association -Xen_ElementConformsToProfile root/interop Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association -#KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association -KVM_ElementConformsToProfile root/interop Virt_ElementConformsToProfileProvider Virt_ElementConformsToProfile association +#Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +Xen_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +#KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +KVM_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association diff -r fdba4d9de966 -r d4e7585a3f53 src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Thu Dec 20 21:30:19 2007 +0100 +++ b/src/Virt_ElementConformsToProfile.c Thu Dec 20 21:30:19 2007 +0100 @@ -244,7 +244,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementConformsToProfileProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_ElementConformsToProfile, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: * mode: C From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:36 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:36 +0200 Subject: [Libvirt-cim] [PATCH 16 of 29] RegisteredProfile: OpenWbem support In-Reply-To: Message-ID: <7eaa38dd006eced987f5.1198182876@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182621 -3600 # Node ID 7eaa38dd006eced987f5d946306a4b80ff3b3fc0 # Parent 2ca0648a068045d57f1329bab6f78ecf2dff8588 RegisteredProfile: OpenWbem support - rename provider from RegisteredProfileProvider to RegisteredProfile - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 2ca0648a0680 -r 7eaa38dd006e schema/RegisteredProfile.mof --- a/schema/RegisteredProfile.mof Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/RegisteredProfile.mof Thu Dec 20 21:30:21 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_RegisteredProfile to represent " - "an advertised conformant profile.") + "an advertised conformant profile."), + Provider("cmpi::Virt_RegisteredProfile") ] class Xen_RegisteredProfile : CIM_RegisteredProfile { @@ -10,7 +11,8 @@ class Xen_RegisteredProfile : CIM_Regist [Description ( "A class derived from CIM_RegisteredProfile to represent " - "an advertised conformant profile.") + "an advertised conformant profile."), + Provider("cmpi::Virt_RegisteredProfile") ] class KVM_RegisteredProfile : CIM_RegisteredProfile { diff -r 2ca0648a0680 -r 7eaa38dd006e schema/RegisteredProfile.registration --- a/schema/RegisteredProfile.registration Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/RegisteredProfile.registration Thu Dec 20 21:30:21 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_RegisteredProfile root/interop Virt_RegisteredProfileProvider Virt_RegisteredProfile instance -KVM_RegisteredProfile root/interop Virt_RegisteredProfileProvider Virt_RegisteredProfile instance +Xen_RegisteredProfile root/interop Virt_RegisteredProfile Virt_RegisteredProfile instance +KVM_RegisteredProfile root/interop Virt_RegisteredProfile Virt_RegisteredProfile instance diff -r 2ca0648a0680 -r 7eaa38dd006e src/Virt_RegisteredProfile.c --- a/src/Virt_RegisteredProfile.c Thu Dec 20 21:30:21 2007 +0100 +++ b/src/Virt_RegisteredProfile.c Thu Dec 20 21:30:21 2007 +0100 @@ -197,7 +197,9 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_RegisteredProfileProvider, _BROKER, +STD_InstanceMIStub(, + Virt_RegisteredProfile, + _BROKER, libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:40 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:40 +0200 Subject: [Libvirt-cim] [PATCH 20 of 29] SettingsDefineCapabilities: OpenWbem support In-Reply-To: Message-ID: <151f147d3c330d1cf2b6.1198182880@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182622 -3600 # Node ID 151f147d3c330d1cf2b6bf8e68e3eb5bc8a12d5c # Parent 0402e7a5877b079efbb53f255da290d095d6890f SettingsDefineCapabilities: OpenWbem support - rename provider from SettingsDefineCapabilitiesProvider to SettingsDefineCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 0402e7a5877b -r 151f147d3c33 schema/SettingsDefineCapabilities.mof --- a/schema/SettingsDefineCapabilities.mof Thu Dec 20 21:30:22 2007 +0100 +++ b/schema/SettingsDefineCapabilities.mof Thu Dec 20 21:30:22 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineCapabilities") +] class Xen_SettingsDefineCapabilities : CIM_SettingsDefineCapabilities { }; -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineCapabilities") +] class KVM_SettingsDefineCapabilities : CIM_SettingsDefineCapabilities { }; diff -r 0402e7a5877b -r 151f147d3c33 schema/SettingsDefineCapabilities.registration --- a/schema/SettingsDefineCapabilities.registration Thu Dec 20 21:30:22 2007 +0100 +++ b/schema/SettingsDefineCapabilities.registration Thu Dec 20 21:30:22 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association -KVM_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilitiesProvider Virt_SettingsDefineCapabilities association +Xen_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilities Virt_SettingsDefineCapabilities association +KVM_SettingsDefineCapabilities root/virt Virt_SettingsDefineCapabilities Virt_SettingsDefineCapabilities association diff -r 0402e7a5877b -r 151f147d3c33 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Thu Dec 20 21:30:22 2007 +0100 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Dec 20 21:30:22 2007 +0100 @@ -883,7 +883,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_SettingsDefineCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_SettingsDefineCapabilities, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:29 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:29 +0200 Subject: [Libvirt-cim] [PATCH 09 of 29] ElementCapabilities: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182619 -3600 # Node ID fdba4d9de9660421b2cb1749951404ed5aa8bdaa # Parent a5d96949d5736e72957adb8eaa511e4b8d4d7aee ElementCapabilities: OpenWbem support - rename provider from ElementCapabilitiesProvider to ElementCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r a5d96949d573 -r fdba4d9de966 schema/ElementCapabilities.mof --- a/schema/ElementCapabilities.mof Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementCapabilities.mof Thu Dec 20 21:30:19 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "A class to associate a ManagedElement with its Capabilities.") + "A class to associate a ManagedElement with its Capabilities."), + Provider("cmpi::Virt_ElementCapabilities") ] class Xen_ElementCapabilities : CIM_ElementCapabilities { @@ -10,7 +11,8 @@ class Xen_ElementCapabilities : CIM_Elem [Association, Description ( - "A class to associate a ManagedElement with its Capabilities.") + "A class to associate a ManagedElement with its Capabilities."), + Provider("cmpi::Virt_ElementCapabilities") ] class KVM_ElementCapabilities : CIM_ElementCapabilities { diff -r a5d96949d573 -r fdba4d9de966 schema/ElementCapabilities.registration --- a/schema/ElementCapabilities.registration Thu Dec 20 21:30:19 2007 +0100 +++ b/schema/ElementCapabilities.registration Thu Dec 20 21:30:19 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association -KVM_ElementCapabilities root/virt Virt_ElementCapabilitiesProvider Virt_ElementCapabilities association +Xen_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association +KVM_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association diff -r a5d96949d573 -r fdba4d9de966 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Thu Dec 20 21:30:19 2007 +0100 +++ b/src/Virt_ElementCapabilities.c Thu Dec 20 21:30:19 2007 +0100 @@ -350,7 +350,11 @@ struct std_assoc *assoc_handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ElementCapabilitiesProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_ElementCapabilities, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: * mode: C From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:41 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:41 +0200 Subject: [Libvirt-cim] [PATCH 21 of 29] SettingsDefineState: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182622 -3600 # Node ID c37a06330fcafd3e6634a674b2fc2c7e800ee37e # Parent 151f147d3c330d1cf2b6bf8e68e3eb5bc8a12d5c SettingsDefineState: OpenWbem support - rename provider from SettingsDefineStateProvider to SettingsDefineState - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 151f147d3c33 -r c37a06330fca schema/SettingsDefineState.mof --- a/schema/SettingsDefineState.mof Thu Dec 20 21:30:22 2007 +0100 +++ b/schema/SettingsDefineState.mof Thu Dec 20 21:30:22 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineState") +] class Xen_SettingsDefineState : CIM_SettingsDefineState { }; -[Association] +[Association, + Provider("cmpi::Virt_SettingsDefineState") +] class KVM_SettingsDefineState : CIM_SettingsDefineState { }; \ No newline at end of file diff -r 151f147d3c33 -r c37a06330fca schema/SettingsDefineState.registration --- a/schema/SettingsDefineState.registration Thu Dec 20 21:30:22 2007 +0100 +++ b/schema/SettingsDefineState.registration Thu Dec 20 21:30:22 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association -KVM_SettingsDefineState root/virt Virt_SettingsDefineStateProvider Virt_SettingsDefineState association +Xen_SettingsDefineState root/virt Virt_SettingsDefineState Virt_SettingsDefineState association +KVM_SettingsDefineState root/virt Virt_SettingsDefineState Virt_SettingsDefineState association diff -r 151f147d3c33 -r c37a06330fca src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Thu Dec 20 21:30:22 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Thu Dec 20 21:30:22 2007 +0100 @@ -392,7 +392,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_SettingsDefineStateProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_SettingsDefineState, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:42 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:42 +0200 Subject: [Libvirt-cim] [PATCH 22 of 29] SystemDevice: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182623 -3600 # Node ID a3524d0d678318b3a8f7bacb1ebca081b33f8976 # Parent c37a06330fcafd3e6634a674b2fc2c7e800ee37e SystemDevice: OpenWbem support - rename provider from SystemDeviceProvider to SystemDevice - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r c37a06330fca -r a3524d0d6783 schema/SystemDevice.mof --- a/schema/SystemDevice.mof Thu Dec 20 21:30:22 2007 +0100 +++ b/schema/SystemDevice.mof Thu Dec 20 21:30:23 2007 +0100 @@ -2,7 +2,8 @@ [Association, Description ( - "A class to associate a Xen_ComputerSystem with its devices." ) + "A class to associate a Xen_ComputerSystem with its devices." ), + Provider("cmpi::Virt_SystemDevice") ] class Xen_SystemDevice : CIM_SystemDevice { @@ -17,7 +18,8 @@ class Xen_SystemDevice : CIM_SystemDevic [Association, Description ( - "A class to associate a KVM_ComputerSystem with its devices." ) + "A class to associate a KVM_ComputerSystem with its devices." ), + Provider("cmpi::Virt_SystemDevice") ] class KVM_SystemDevice : CIM_SystemDevice { diff -r c37a06330fca -r a3524d0d6783 schema/SystemDevice.registration --- a/schema/SystemDevice.registration Thu Dec 20 21:30:22 2007 +0100 +++ b/schema/SystemDevice.registration Thu Dec 20 21:30:23 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association -KVM_SystemDevice root/virt Virt_SystemDeviceProvider Virt_SystemDevice association +Xen_SystemDevice root/virt Virt_SystemDevice Virt_SystemDevice association +KVM_SystemDevice root/virt Virt_SystemDevice Virt_SystemDevice association diff -r c37a06330fca -r a3524d0d6783 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Thu Dec 20 21:30:22 2007 +0100 +++ b/src/Virt_SystemDevice.c Thu Dec 20 21:30:23 2007 +0100 @@ -268,7 +268,11 @@ static struct std_assoc *assoc_handlers[ NULL }; -STDA_AssocMIStub(, Virt_SystemDeviceProvider, _BROKER, libvirt_cim_init(), assoc_handlers); +STDA_AssocMIStub(, + Virt_SystemDevice, + _BROKER, + libvirt_cim_init(), + assoc_handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:37 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:37 +0200 Subject: [Libvirt-cim] [PATCH 17 of 29] ResourceAllocationFromPool: OpenWbem support In-Reply-To: Message-ID: <1c5cfb9f21a045788eac.1198182877@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182621 -3600 # Node ID 1c5cfb9f21a045788eac5b090b7a64ab31d79541 # Parent 7eaa38dd006eced987f5d946306a4b80ff3b3fc0 ResourceAllocationFromPool: OpenWbem support - rename provider from ResourceAllocationFromPoolProvider to ResourceAllocationFromPool - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 7eaa38dd006e -r 1c5cfb9f21a0 schema/ResourceAllocationFromPool.mof --- a/schema/ResourceAllocationFromPool.mof Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/ResourceAllocationFromPool.mof Thu Dec 20 21:30:21 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_ResourceAllocationFromPool") +] class Xen_ResourceAllocationFromPool : CIM_ResourceAllocationFromPool { }; -[Association] +[Association, + Provider("cmpi::Virt_ResourceAllocationFromPool") +] class KVM_ResourceAllocationFromPool : CIM_ResourceAllocationFromPool { }; diff -r 7eaa38dd006e -r 1c5cfb9f21a0 schema/ResourceAllocationFromPool.registration --- a/schema/ResourceAllocationFromPool.registration Thu Dec 20 21:30:21 2007 +0100 +++ b/schema/ResourceAllocationFromPool.registration Thu Dec 20 21:30:21 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association -KVM_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPoolProvider Virt_ResourceAllocationFromPool association \ No newline at end of file +Xen_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPool Virt_ResourceAllocationFromPool association +KVM_ResourceAllocationFromPool root/virt Virt_ResourceAllocationFromPool Virt_ResourceAllocationFromPool association \ No newline at end of file diff -r 7eaa38dd006e -r 1c5cfb9f21a0 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Thu Dec 20 21:30:21 2007 +0100 +++ b/src/Virt_ResourceAllocationFromPool.c Thu Dec 20 21:30:21 2007 +0100 @@ -290,7 +290,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_ResourceAllocationFromPoolProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_ResourceAllocationFromPool, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:43 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:43 +0200 Subject: [Libvirt-cim] [PATCH 23 of 29] VirtualSystemManagementCapabilities: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182623 -3600 # Node ID c308a657e5a668e4460c1ed3739066d008772b37 # Parent a3524d0d678318b3a8f7bacb1ebca081b33f8976 VirtualSystemManagementCapabilities: OpenWbem support - rename provider from VirtualSystemManagementCapabilitiesProvider to VirtualSystemManagementCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r a3524d0d6783 -r c308a657e5a6 schema/VirtualSystemManagementCapabilities.mof --- a/schema/VirtualSystemManagementCapabilities.mof Thu Dec 20 21:30:23 2007 +0100 +++ b/schema/VirtualSystemManagementCapabilities.mof Thu Dec 20 21:30:23 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_Capabilities to represent " - "the management capabilities of a Xen virtual system") + "the management capabilities of a Xen virtual system"), + Provider("cmpi::Virt_VirtualSystemManagementCapabilities") ] class Xen_VirtualSystemManagementCapabilities : CIM_VirtualSystemManagementCapabilities { @@ -10,7 +11,8 @@ class Xen_VirtualSystemManagementCapabil [Description ( "A class derived from CIM_Capabilities to represent " - "the management capabilities of a KVM virtual system.") + "the management capabilities of a KVM virtual system."), + Provider("cmpi::Virt_VirtualSystemManagementCapabilities") ] class KVM_VirtualSystemManagementCapabilities : CIM_VirtualSystemManagementCapabilities { diff -r a3524d0d6783 -r c308a657e5a6 schema/VirtualSystemManagementCapabilities.registration --- a/schema/VirtualSystemManagementCapabilities.registration Thu Dec 20 21:30:23 2007 +0100 +++ b/schema/VirtualSystemManagementCapabilities.registration Thu Dec 20 21:30:23 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilitiesProvider Virt_VirtualSystemManagementCapabilities instance -KVM_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilitiesProvider Virt_VirtualSystemManagementCapabilities instance +Xen_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilities Virt_VirtualSystemManagementCapabilities instance +KVM_VirtualSystemManagementCapabilities root/virt Virt_VirtualSystemManagementCapabilities Virt_VirtualSystemManagementCapabilities instance diff -r a3524d0d6783 -r c308a657e5a6 src/Virt_VirtualSystemManagementCapabilities.c --- a/src/Virt_VirtualSystemManagementCapabilities.c Thu Dec 20 21:30:23 2007 +0100 +++ b/src/Virt_VirtualSystemManagementCapabilities.c Thu Dec 20 21:30:23 2007 +0100 @@ -181,8 +181,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VirtualSystemManagementCapabilitiesProvider, _BROKER, - libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_VirtualSystemManagementCapabilities, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:45 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:45 +0200 Subject: [Libvirt-cim] [PATCH 25 of 29] VirtualSystemMigrationCapabilities: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182624 -3600 # Node ID a6900f337fe25b346b2e07ec7d0357baa45f2b74 # Parent 96a7589df350e3fc1d258f037f3cd58edab7fd5b VirtualSystemMigrationCapabilities: OpenWbem support - rename provider from VSMC to VSMigrationCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 96a7589df350 -r a6900f337fe2 schema/VSMigrationCapabilities.mof --- a/schema/VSMigrationCapabilities.mof Thu Dec 20 21:30:24 2007 +0100 +++ b/schema/VSMigrationCapabilities.mof Thu Dec 20 21:30:24 2007 +0100 @@ -10,8 +10,10 @@ class Virt_VirtualSystemMigrationCapabil }; +[Provider("cmpi::Virt_VSMigrationCapabilities")] class Xen_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { }; +[Provider("cmpi::Virt_VSMigrationCapabilities")] class KVM_VirtualSystemMigrationCapabilities : Virt_VirtualSystemMigrationCapabilities { }; diff -r 96a7589df350 -r a6900f337fe2 schema/VSMigrationCapabilities.registration --- a/schema/VSMigrationCapabilities.registration Thu Dec 20 21:30:24 2007 +0100 +++ b/schema/VSMigrationCapabilities.registration Thu Dec 20 21:30:24 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance -KVM_VirtualSystemMigrationCapabilities root/virt Virt_VSMC Virt_VSMigrationCapabilities instance \ No newline at end of file +Xen_VirtualSystemMigrationCapabilities root/virt Virt_VSMigrationCapabilities Virt_VSMigrationCapabilities instance +KVM_VirtualSystemMigrationCapabilities root/virt Virt_VSMigrationCapabilities Virt_VSMigrationCapabilities instance \ No newline at end of file diff -r 96a7589df350 -r a6900f337fe2 src/Virt_VSMigrationCapabilities.c --- a/src/Virt_VSMigrationCapabilities.c Thu Dec 20 21:30:24 2007 +0100 +++ b/src/Virt_VSMigrationCapabilities.c Thu Dec 20 21:30:24 2007 +0100 @@ -177,7 +177,8 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VSMC, +STD_InstanceMIStub(, + Virt_VSMigrationCapabilities, _BROKER, libvirt_cim_init()); From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:44 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:44 +0200 Subject: [Libvirt-cim] [PATCH 24 of 29] VirtualSystemManagementService: OpenWbem support In-Reply-To: Message-ID: <96a7589df350e3fc1d25.1198182884@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182624 -3600 # Node ID 96a7589df350e3fc1d258f037f3cd58edab7fd5b # Parent c308a657e5a668e4460c1ed3739066d008772b37 VirtualSystemManagementService: OpenWbem support - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r c308a657e5a6 -r 96a7589df350 schema/VirtualSystemManagementService.mof --- a/schema/VirtualSystemManagementService.mof Thu Dec 20 21:30:23 2007 +0100 +++ b/schema/VirtualSystemManagementService.mof Thu Dec 20 21:30:24 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_VirtualSystemManagementService")] class Xen_VirtualSystemManagementService : CIM_VirtualSystemManagementService { }; +[Provider("cmpi::Virt_VirtualSystemManagementService")] class KVM_VirtualSystemManagementService : CIM_VirtualSystemManagementService { }; diff -r c308a657e5a6 -r 96a7589df350 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Dec 20 21:30:23 2007 +0100 +++ b/src/Virt_VirtualSystemManagementService.c Thu Dec 20 21:30:24 2007 +0100 @@ -1246,7 +1246,9 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VirtualSystemManagementService, _BROKER, +STD_InstanceMIStub(, + Virt_VirtualSystemManagementService, + _BROKER, libvirt_cim_init()); From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:48 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:48 +0200 Subject: [Libvirt-cim] [PATCH 28 of 29] VirtualSystemSettingDataComponent: OpenWbem support In-Reply-To: Message-ID: <74d7f2fc36f03944c8ca.1198182888@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182625 -3600 # Node ID 74d7f2fc36f03944c8ca54b86952dcd0e744e4ad # Parent 339737297fb7cc37d00eaaffbdd9ed71e499f000 VirtualSystemSettingDataComponent: OpenWbem support - rename provider from VSSDComponentProvider to VSSDComponent - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 339737297fb7 -r 74d7f2fc36f0 schema/VSSDComponent.mof --- a/schema/VSSDComponent.mof Thu Dec 20 21:30:25 2007 +0100 +++ b/schema/VSSDComponent.mof Thu Dec 20 21:30:25 2007 +0100 @@ -1,11 +1,15 @@ // Copyright IBM Corp. 2007 -[Association] +[Association, + Provider("cmpi::Virt_VSSDComponent") +] class Xen_VirtualSystemSettingDataComponent : CIM_Component { }; -[Association] +[Association, + Provider("cmpi::Virt_VSSDComponent") +] class KVM_VirtualSystemSettingDataComponent : CIM_Component { }; diff -r 339737297fb7 -r 74d7f2fc36f0 schema/VSSDComponent.registration --- a/schema/VSSDComponent.registration Thu Dec 20 21:30:25 2007 +0100 +++ b/schema/VSSDComponent.registration Thu Dec 20 21:30:25 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association -KVM_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponentProvider Virt_VSSDComponent association +Xen_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponent Virt_VSSDComponent association +KVM_VirtualSystemSettingDataComponent root/virt Virt_VSSDComponent Virt_VSSDComponent association diff -r 339737297fb7 -r 74d7f2fc36f0 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Thu Dec 20 21:30:25 2007 +0100 +++ b/src/Virt_VSSDComponent.c Thu Dec 20 21:30:25 2007 +0100 @@ -210,7 +210,11 @@ static struct std_assoc *handlers[] = { NULL }; -STDA_AssocMIStub(, Virt_VSSDComponentProvider, _BROKER, libvirt_cim_init(), handlers); +STDA_AssocMIStub(, + Virt_VSSDComponent, + _BROKER, + libvirt_cim_init(), + handlers); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:47 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:47 +0200 Subject: [Libvirt-cim] [PATCH 27 of 29] VirtualSystemSettingData: OpenWbem support In-Reply-To: Message-ID: <339737297fb7cc37d00e.1198182887@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182625 -3600 # Node ID 339737297fb7cc37d00eaaffbdd9ed71e499f000 # Parent f9200a96d5da873f77f8a41a12e35c45a35225e2 VirtualSystemSettingData: OpenWbem support - rename provider from VSSDProvider to VSSD - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r f9200a96d5da -r 339737297fb7 schema/VSSD.mof --- a/schema/VSSD.mof Thu Dec 20 21:30:24 2007 +0100 +++ b/schema/VSSD.mof Thu Dec 20 21:30:25 2007 +0100 @@ -2,7 +2,8 @@ [Description ( "A class derived from CIM_VirtualSystemSettingData to represent " - "the config of Xen virtual machines/domains running on the system.") + "the config of Xen virtual machines/domains running on the system."), + Provider("cmpi::Virt_VSSD") ] class Xen_VirtualSystemSettingData : CIM_VirtualSystemSettingData { @@ -14,7 +15,8 @@ class Xen_VirtualSystemSettingData : CIM [Description ( "A class derived from CIM_VirtualSystemSettingData to represent " - "the config of KVM virtual machines/domains running on the system.") + "the config of KVM virtual machines/domains running on the system."), + Provider("cmpi::Virt_VSSD") ] class KVM_VirtualSystemSettingData : CIM_VirtualSystemSettingData { diff -r f9200a96d5da -r 339737297fb7 schema/VSSD.registration --- a/schema/VSSD.registration Thu Dec 20 21:30:24 2007 +0100 +++ b/schema/VSSD.registration Thu Dec 20 21:30:25 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_VirtualSystemSettingData root/virt Virt_VSSDProvider Virt_VSSD instance -KVM_VirtualSystemSettingData root/virt Virt_VSSDProvider Virt_VSSD instance +Xen_VirtualSystemSettingData root/virt Virt_VSSD Virt_VSSD instance +KVM_VirtualSystemSettingData root/virt Virt_VSSD Virt_VSSD instance diff -r f9200a96d5da -r 339737297fb7 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Thu Dec 20 21:30:24 2007 +0100 +++ b/src/Virt_VSSD.c Thu Dec 20 21:30:25 2007 +0100 @@ -250,7 +250,10 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VSSDProvider, _BROKER, libvirt_cim_init()); +STD_InstanceMIStub(, + Virt_VSSD, + _BROKER, + libvirt_cim_init()); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:25 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:25 +0200 Subject: [Libvirt-cim] [PATCH 05 of 29] AllocationCapabilities: OpenWbem support In-Reply-To: Message-ID: <5cb5f3e499759a36e2c9.1198182865@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182618 -3600 # Node ID 5cb5f3e499759a36e2c978084e0fc80086952364 # Parent def7d71ec42294a074768f38845a0449520a4e41 AllocationCapabilities: OpenWbem support - rename provider from AllocationCapabilitiesProvider to AllocationCapabilities - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r def7d71ec422 -r 5cb5f3e49975 schema/AllocationCapabilities.mof --- a/schema/AllocationCapabilities.mof Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/AllocationCapabilities.mof Thu Dec 20 21:30:18 2007 +0100 @@ -1,9 +1,11 @@ // Copyright IBM Corp. 2007 +[Provider("cmpi::Virt_AllocationCapabilities")] class Xen_AllocationCapabilities : CIM_AllocationCapabilities { }; +[Provider("cmpi::Virt_AllocationCapabilities")] class KVM_AllocationCapabilities : CIM_AllocationCapabilities { }; diff -r def7d71ec422 -r 5cb5f3e49975 schema/AllocationCapabilities.registration --- a/schema/AllocationCapabilities.registration Thu Dec 20 21:30:18 2007 +0100 +++ b/schema/AllocationCapabilities.registration Thu Dec 20 21:30:18 2007 +0100 @@ -1,4 +1,4 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_AllocationCapabilities root/virt Virt_AllocationCapabilitiesProvider Virt_AllocationCapabilities instance -KVM_AllocationCapabilities root/virt Virt_AllocationCapabilitiesProvider Virt_AllocationCapabilities instance +Xen_AllocationCapabilities root/virt Virt_AllocationCapabilities Virt_AllocationCapabilities instance +KVM_AllocationCapabilities root/virt Virt_AllocationCapabilities Virt_AllocationCapabilities instance diff -r def7d71ec422 -r 5cb5f3e49975 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Thu Dec 20 21:30:18 2007 +0100 +++ b/src/Virt_AllocationCapabilities.c Thu Dec 20 21:30:18 2007 +0100 @@ -211,7 +211,9 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_AllocationCapabilitiesProvider, _BROKER, +STD_InstanceMIStub(, + Virt_AllocationCapabilities, + _BROKER, libvirt_cim_init()); /* From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:49 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:49 +0200 Subject: [Libvirt-cim] [PATCH 29 of 29] ComputerSystemIndication: OpenWbem support In-Reply-To: Message-ID: <5ea671a0e9e9033dd809.1198182889@localhost.localdomain> # HG changeset patch # User Heidi Eckhart # Date 1198182625 -3600 # Node ID 5ea671a0e9e9033dd8092565e434ff3a79872d84 # Parent 74d7f2fc36f03944c8ca54b86952dcd0e744e4ad ComputerSystemIndication: OpenWbem support - rename provider from ComputerSystemIndicationProvider to ComputerSystemIndication - update registration file with new providername - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r 74d7f2fc36f0 -r 5ea671a0e9e9 schema/ComputerSystemIndication.mof --- a/schema/ComputerSystemIndication.mof Thu Dec 20 21:30:25 2007 +0100 +++ b/schema/ComputerSystemIndication.mof Thu Dec 20 21:30:25 2007 +0100 @@ -1,21 +1,29 @@ // Copyright IBM Corp. 2007 -[Description ("Xen_ComputerSystem created")] +[Description ("Xen_ComputerSystem created"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class Xen_ComputerSystemCreatedIndication : CIM_InstCreation { }; -[Description ("Xen_ComputerSystem deleted")] +[Description ("Xen_ComputerSystem deleted"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class Xen_ComputerSystemDeletedIndication : CIM_InstDeletion { }; -[Description ("KVM_ComputerSystem lifecycle")] +[Description ("KVM_ComputerSystem lifecycle"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class KVM_ComputerSystemCreatedIndication : CIM_InstCreation { }; -[Description ("KVM_ComputerSystem lifecycle")] +[Description ("KVM_ComputerSystem lifecycle"), + Provider("cmpi::Virt_ComputerSystemIndication") +] class KVM_ComputerSystemDeletedIndication : CIM_InstDeletion { }; diff -r 74d7f2fc36f0 -r 5ea671a0e9e9 schema/ComputerSystemIndication.registration --- a/schema/ComputerSystemIndication.registration Thu Dec 20 21:30:25 2007 +0100 +++ b/schema/ComputerSystemIndication.registration Thu Dec 20 21:30:25 2007 +0100 @@ -1,6 +1,6 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method -Xen_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method -KVM_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method -KVM_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndicationProvider Virt_ComputerSystemIndication indication method +Xen_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method +Xen_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method +KVM_ComputerSystemCreatedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method +KVM_ComputerSystemDeletedIndication root/virt Virt_ComputerSystemIndication Virt_ComputerSystemIndication indication method diff -r 74d7f2fc36f0 -r 5ea671a0e9e9 src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Thu Dec 20 21:30:25 2007 +0100 +++ b/src/Virt_ComputerSystemIndication.c Thu Dec 20 21:30:25 2007 +0100 @@ -303,8 +303,11 @@ DEFAULT_AF(); DEFAULT_AF(); DEFAULT_MP(); -STDI_IndicationMIStub(, Virt_ComputerSystemIndicationProvider, - _BROKER, libvirt_cim_init(), &csi); +STDI_IndicationMIStub(, + Virt_ComputerSystemIndication, + _BROKER, + libvirt_cim_init(), + &csi); /* * Local Variables: From heidieck at linux.vnet.ibm.com Thu Dec 20 19:34:46 2007 From: heidieck at linux.vnet.ibm.com (Heidi Eckhart) Date: Thu, 20 Dec 2007 21:34:46 +0200 Subject: [Libvirt-cim] [PATCH 26 of 29] VirtualSystemMigrationService: OpenWbem support In-Reply-To: Message-ID: # HG changeset patch # User Heidi Eckhart # Date 1198182624 -3600 # Node ID f9200a96d5da873f77f8a41a12e35c45a35225e2 # Parent a6900f337fe25b346b2e07ec7d0357baa45f2b74 VirtualSystemMigrationService: OpenWbem support - add "Provider" qualifier to mof Signed-off-by: Heidi Eckhart diff -r a6900f337fe2 -r f9200a96d5da schema/VSMigrationService.mof --- a/schema/VSMigrationService.mof Thu Dec 20 21:30:24 2007 +0100 +++ b/schema/VSMigrationService.mof Thu Dec 20 21:30:24 2007 +0100 @@ -36,9 +36,11 @@ class Virt_MigrationJob : CIM_ConcreteJo class Virt_MigrationJob : CIM_ConcreteJob { }; +[Provider("cmpi::Virt_VSMigrationService")] class Xen_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { }; +[Provider("cmpi::Virt_VSMigrationService")] class KVM_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService { }; diff -r a6900f337fe2 -r f9200a96d5da src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu Dec 20 21:30:24 2007 +0100 +++ b/src/Virt_VSMigrationService.c Thu Dec 20 21:30:24 2007 +0100 @@ -751,7 +751,8 @@ DEFAULT_EQ(); DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); -STD_InstanceMIStub(, Virt_VSMigrationService, +STD_InstanceMIStub(, + Virt_VSMigrationService, _BROKER, libvirt_cim_init()); /* From kaitlin at linux.vnet.ibm.com Thu Dec 20 20:48:44 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 12:48:44 -0800 Subject: [Libvirt-cim] [PATCH 0 of 3] EAFP and RAFP support invalid instances. Message-ID: This fix makes it so that EAFP and RAFP do not return instances if an invalid ref is given. These patches are dependant on the "Clean up RAFP and EAFP pool_to_* handlers." patchset. From kaitlin at linux.vnet.ibm.com Thu Dec 20 20:48:45 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 12:48:45 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] Cleanup device_type_from_poolid() in DevicePool In-Reply-To: Message-ID: <912a37bdd53f3fbf8e13.1198183725@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198183661 28800 # Node ID 912a37bdd53f3fbf8e13026d8cbc02921aa028c1 # Parent 84eb3549e19956d912684a09d58631211724a720 Cleanup device_type_from_poolid() in DevicePool. Change device_type_from_poolid() to device_type_from_str() so that this function can be used for DevicePool classnames as well as InstanceIDs. Change return type to uint16_t to match the device type. Change "Memory" and "Processor" to "MemoryPool" and "ProcessorPool" so that it's more strict. Replace strstr with STARTS_WITH() so that the check is more strict. Signed-off-by: Kaitlin Rupert diff -r 84eb3549e199 -r 912a37bdd53f src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Thu Dec 20 10:14:00 2007 -0800 +++ b/src/Virt_DevicePool.c Thu Dec 20 12:47:41 2007 -0800 @@ -268,15 +268,15 @@ char *pool_member_of(const CMPIBroker *b return poolid; } -int device_type_from_poolid(const char *id) -{ - if (strstr(id, "NetworkPool")) +uint16_t device_type_from_str(const char *str) +{ + if (STARTS_WITH(str, "NetworkPool")) return VIRT_DEV_NET; - else if (strstr(id, "DiskPool")) + else if (STARTS_WITH(str, "DiskPool")) return VIRT_DEV_DISK; - else if (strstr(id, "Memory")) + else if (STARTS_WITH(str, "MemoryPool")) return VIRT_DEV_MEM; - else if (strstr(id, "Processor")) + else if (STARTS_WITH(str, "ProcessorPool")) return VIRT_DEV_VCPU; else return VIRT_DEV_UNKNOWN; diff -r 84eb3549e199 -r 912a37bdd53f src/Virt_DevicePool.h --- a/src/Virt_DevicePool.h Thu Dec 20 10:14:00 2007 -0800 +++ b/src/Virt_DevicePool.h Thu Dec 20 12:47:41 2007 -0800 @@ -56,11 +56,11 @@ char *pool_member_of(const CMPIBroker *b const char *id); /** - * * Get the device type of a given pool from the pool's InstanceID - * * - * * @param id The InstanceID of the pool - * */ -int device_type_from_poolid(const char *id); + * Get the device type of a given pool from the pool's InstanceID + * + * @param id The InstanceID of the pool + */ +uint16_t device_type_from_str(const char *str); /** * Get all device pools on the system for the given connection From kaitlin at linux.vnet.ibm.com Thu Dec 20 20:48:46 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 12:48:46 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Add check in EAFP to ensure ref passed is an actual instance In-Reply-To: Message-ID: <3a2bf29ad7376918fdfd.1198183726@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198183662 28800 # Node ID 3a2bf29ad7376918fdfd77990cbdc15c8d9bf4c7 # Parent 912a37bdd53f3fbf8e13026d8cbc02921aa028c1 Add check in EAFP to ensure ref passed is an actual instance. EAFP currently returns instances for invalid refs where the InstanceID doesn't match the classname type (see failing query). Now that device_type_from_str() allows strings, instead of passing the poolid, pass the classname base. If the InstanceID doesn't match that of a valid pool, devs_from_pool() will return an empty instance list. Failing query: wbemcli ain -ac Xen_ElementAllocatedFromPool 'http://localhost:5988/root/virt:Xen_DiskPool.InstanceID="NetworkPool/virbr0"' Signed-off-by: Kaitlin Rupert diff -r 912a37bdd53f -r 3a2bf29ad737 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Thu Dec 20 12:47:41 2007 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Thu Dec 20 12:47:42 2007 -0800 @@ -215,7 +215,7 @@ static CMPIStatus pool_to_vdev(const CMP CU_DEBUG("Got %s\n", poolid); - type = device_type_from_poolid(poolid); + type = device_type_from_str(class_base_name(CLASSNAME(ref))); if (type == VIRT_DEV_UNKNOWN) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, From kaitlin at linux.vnet.ibm.com Thu Dec 20 20:48:47 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 12:48:47 -0800 Subject: [Libvirt-cim] [PATCH 3 of 3] Add check in RAFP to ensure ref passed is an actual instance In-Reply-To: Message-ID: <89eacde64e5385e9003a.1198183727@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198183692 28800 # Node ID 89eacde64e5385e9003a8312983ab41468d8f54b # Parent 3a2bf29ad7376918fdfd77990cbdc15c8d9bf4c7 Add check in RAFP to ensure ref passed is an actual instance. RAFP currently returns instances for invalid refs where the InstanceID doesn't match the classname type (see failing query). Now that device_type_from_str() allows strings, instead of passing the poolid, pass the classname base. If the InstanceID doesn't match that of a valid pool, rasds_from_pool() will return an empty instance list. Failing query: wbemcli ain -ac Xen_ResourceAllocationFromPool 'http://localhost:5988/root/virt:Xen_ProcessorPool.InstanceID="MemoryPool/0"' Signed-off-by: Kaitlin Rupert diff -r 3a2bf29ad737 -r 89eacde64e53 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Thu Dec 20 12:47:42 2007 -0800 +++ b/src/Virt_ResourceAllocationFromPool.c Thu Dec 20 12:48:12 2007 -0800 @@ -194,7 +194,7 @@ static CMPIStatus pool_to_rasd(const CMP goto out; } - type = device_type_from_poolid(poolid); + type = device_type_from_str(class_base_name(CLASSNAME(ref))); if (type == VIRT_DEV_UNKNOWN) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, From kaitlin at linux.vnet.ibm.com Thu Dec 20 23:34:54 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 20 Dec 2007 15:34:54 -0800 Subject: [Libvirt-cim] [PATCH 00 of 29] #2 - Enable libvirt-cim providers for OpenWbem In-Reply-To: References: Message-ID: <476AFC1E.4080907@linux.vnet.ibm.com> Heidi Eckhart wrote: > updated schema and provider registration scripts > added "Provider" qualifier to each provider's mof > fixed provider and module naming > > Diff to #1: > - patch 1: registration for interop namespace must be root/interop instead of /root/interop for OpenWbem > - patch 7: forgot to rename provider in src file > - patch 17: fixed hg header > - patch 19: forgot to rename provider of MethodMI > Good finds. =) +1 -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From yunguol at cn.ibm.com Fri Dec 21 08:42:13 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 21 Dec 2007 16:42:13 +0800 Subject: [Libvirt-cim] report Xen_HostSystem parsing error in F8 while make postinstall Message-ID: Hi, When I running make postinstall, it reports parsing error : Parsing error: parse error: Error adding class Xen_HostSystem to the repository: CIM_ERR_INVALID_SUPERCLASS: Operation cannot be carried out since the specified superclass does not exist: "CIM_ComputerSystem" Actually, CIM_ComputerSystem exist in the repository (/var/lib/Pegasus/repository/root#virt/classes), and Xen_HostSystem has been added to the repository. Of course, I have installed schema cimv216Experimental successfully. This is using xen-3.1.0-13.fc8 and libvirt-0.3.3-2.fc8. However, there is no error in RHEL 5.1 by making postinstall. Who know why? Thanks! Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From danms at us.ibm.com Fri Dec 21 14:43:00 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 21 Dec 2007 06:43:00 -0800 Subject: [Libvirt-cim] class Virt_VirtualSystemMigrationCapabilities In-Reply-To: <476ACEF7.2010505@linux.vnet.ibm.com> (Heidi Eckhart's message of "Thu, 20 Dec 2007 21:22:15 +0100") References: <476ACEF7.2010505@linux.vnet.ibm.com> Message-ID: <87fxxwnm6j.fsf@theine.beaverton.ibm.com> HE> the subclass for VirtualSystemMigrationCapabilities in HE> VSMigrationCapabilities.mof has "Virt" as prefix instead of HE> "CIM". Does this has a certain background ? I think that I was running into an issue putting the superclass in the MOF when I did that. I was seeing some weird behavior, and thought it might have been related to putting a CIM_ class in the implementation MOF. I'm sure it was unrelated, but I didn't change it back. If it works as CIM_, I'm fine with switching it. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Fri Dec 21 14:45:12 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 21 Dec 2007 06:45:12 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] Cleanup device_type_from_poolid() in DevicePool In-Reply-To: <912a37bdd53f3fbf8e13.1198183725@elm3b41.beaverton.ibm.com> (Kaitlin Rupert's message of "Thu, 20 Dec 2007 12:48:45 -0800") References: <912a37bdd53f3fbf8e13.1198183725@elm3b41.beaverton.ibm.com> Message-ID: <87bq8knm2v.fsf@theine.beaverton.ibm.com> KR> Change device_type_from_poolid() to device_type_from_str() so that KR> this function can be used for DevicePool classnames as well as KR> InstanceIDs. How about device_type_from_id()? The "from_str" sounds like instance parsing or something like that. ID could mean DeviceID or InstanceID. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Fri Dec 21 14:47:40 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 21 Dec 2007 06:47:40 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Add check in EAFP to ensure ref passed is an actual instance In-Reply-To: <3a2bf29ad7376918fdfd.1198183726@elm3b41.beaverton.ibm.com> (Kaitlin Rupert's message of "Thu, 20 Dec 2007 12:48:46 -0800") References: <3a2bf29ad7376918fdfd.1198183726@elm3b41.beaverton.ibm.com> Message-ID: <877ij8nlyr.fsf@theine.beaverton.ibm.com> KR> - type = device_type_from_poolid(poolid); KR> + type = device_type_from_str(class_base_name(CLASSNAME(ref))); A couple things here. First, I think that we should be passing in the id, in case we need to do more specific checking in the future. We can check the classname of the ref separately. Second, class_base_name() returns a strdup()'d string, so you leak that here. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Fri Dec 21 14:51:46 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 21 Dec 2007 06:51:46 -0800 Subject: [Libvirt-cim] report Xen_HostSystem parsing error in F8 while make postinstall In-Reply-To: (Guo Lian Yun's message of "Fri, 21 Dec 2007 16:42:13 +0800") References: Message-ID: <873atwnlrx.fsf@theine.beaverton.ibm.com> GY> When I running make postinstall, it reports parsing error : In what environment? GY> Parsing error: parse error: Error adding class Xen_HostSystem to GY> the repository: CIM_ERR_INVALID_SUPERCLASS: Operation cannot be GY> carried out since the specified superclass does not exist: GY> "CIM_ComputerSystem" Hmm, this is what I usually see when the base schema isn't installed. Perhaps you need to completely remove your root#virt repository and reinstall the base schema? You can try removing that directory and then running "make preinstall" to install the base schema with our automated system. There may be more debugging you can do, but I tend to take a "brute force" mentality to debugging silly Pegasus issues :) Maybe someone else has a better solution? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Dec 21 15:56:10 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 07:56:10 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Add check in EAFP to ensure ref passed is an actual instance In-Reply-To: <877ij8nlyr.fsf@theine.beaverton.ibm.com> References: <3a2bf29ad7376918fdfd.1198183726@elm3b41.beaverton.ibm.com> <877ij8nlyr.fsf@theine.beaverton.ibm.com> Message-ID: <476BE21A.8060100@linux.vnet.ibm.com> Dan Smith wrote: > KR> - type = device_type_from_poolid(poolid); > KR> + type = device_type_from_str(class_base_name(CLASSNAME(ref))); > > A couple things here. First, I think that we should be passing in the > id, in case we need to do more specific checking in the future. We > can check the classname of the ref separately. We'll need to do the classname checking here because the bug is that you can pass a Xen_MemoryPool class with "ProcessorPool/0" as the ID, which isn't valid. > > Second, class_base_name() returns a strdup()'d string, so you leak > that here. > Oh yes, good catch. Thanks. =) I'll re-work this. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Dec 21 16:11:32 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 08:11:32 -0800 Subject: [Libvirt-cim] report Xen_HostSystem parsing error in F8 while make postinstall In-Reply-To: <873atwnlrx.fsf@theine.beaverton.ibm.com> References: <873atwnlrx.fsf@theine.beaverton.ibm.com> Message-ID: <476BE5B4.9070104@linux.vnet.ibm.com> Dan Smith wrote: > GY> When I running make postinstall, it reports parsing error : > > In what environment? > > GY> Parsing error: parse error: Error adding class Xen_HostSystem to > GY> the repository: CIM_ERR_INVALID_SUPERCLASS: Operation cannot be > GY> carried out since the specified superclass does not exist: > GY> "CIM_ComputerSystem" > > Hmm, this is what I usually see when the base schema isn't installed. > Perhaps you need to completely remove your root#virt repository and > reinstall the base schema? You can try removing that directory and > then running "make preinstall" to install the base schema with our > automated system. > > There may be more debugging you can do, but I tend to take a "brute > force" mentality to debugging silly Pegasus issues :) > > Maybe someone else has a better solution? > I think I ran into a similar issue on Fedora 8 the first time I set things up. I think I had to do the following: 1) Remove the classes from root#virt and root#interop. 2) Re-add the classes to root#virt and root#interop (see http://libvirt.org/CIM/schema.html for more info) 3) Run make preuninstall, make uninstall, make, make install, make postinstall in the libvirt-cim directory. If the make postinstall still fails, trying running make preuninstall and then make postinstall again. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Dec 21 16:22:08 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 08:22:08 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] Cleanup device_type_from_poolid() in DevicePool In-Reply-To: <87bq8knm2v.fsf@theine.beaverton.ibm.com> References: <912a37bdd53f3fbf8e13.1198183725@elm3b41.beaverton.ibm.com> <87bq8knm2v.fsf@theine.beaverton.ibm.com> Message-ID: <476BE830.5040204@linux.vnet.ibm.com> Dan Smith wrote: > KR> Change device_type_from_poolid() to device_type_from_str() so that > KR> this function can be used for DevicePool classnames as well as > KR> InstanceIDs. > > How about device_type_from_id()? The "from_str" sounds like instance > parsing or something like that. ID could mean DeviceID or InstanceID. > The change to "from_str()" here is so that one would be able to pass the classname in. The logic for determining the device / pool type is the same for the InstanceID and the classname. But if this is confusing, I could change the name to something else. Or, I could add 2 wrapper functions with clearer names. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From danms at us.ibm.com Fri Dec 21 16:23:57 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 21 Dec 2007 08:23:57 -0800 Subject: [Libvirt-cim] [PATCH 2 of 3] Add check in EAFP to ensure ref passed is an actual instance In-Reply-To: <476BE21A.8060100@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Fri, 21 Dec 2007 07:56:10 -0800") References: <3a2bf29ad7376918fdfd.1198183726@elm3b41.beaverton.ibm.com> <877ij8nlyr.fsf@theine.beaverton.ibm.com> <476BE21A.8060100@linux.vnet.ibm.com> Message-ID: <87y7bom2xu.fsf@theine.beaverton.ibm.com> KR> We'll need to do the classname checking here because the bug is KR> that you can pass a Xen_MemoryPool class with "ProcessorPool/0" as KR> the ID, which isn't valid. Right. Maybe cu_compare_ref() be used to do this here? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Fri Dec 21 16:26:51 2007 From: danms at us.ibm.com (Dan Smith) Date: Fri, 21 Dec 2007 08:26:51 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] Cleanup device_type_from_poolid() in DevicePool In-Reply-To: <476BE830.5040204@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Fri, 21 Dec 2007 08:22:08 -0800") References: <912a37bdd53f3fbf8e13.1198183725@elm3b41.beaverton.ibm.com> <87bq8knm2v.fsf@theine.beaverton.ibm.com> <476BE830.5040204@linux.vnet.ibm.com> Message-ID: <87tzmcm2t0.fsf@theine.beaverton.ibm.com> KR> The change to "from_str()" here is so that one would be able to KR> pass the classname in. The logic for determining the device / KR> pool type is the same for the InstanceID and the classname. Right, but we could potentially need to look at more of the ID in some cases to determine the type, right? If we had disk pools that represent LVMs separately from file images or something like that. I suppose it's reasonable to think that the classname would always indicate the subtype, but it just seems cleaner to me to always do it From an ID. We can adjust it later if we come across this situation, I just thought it was worth considering. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Dec 21 17:10:56 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 09:10:56 -0800 Subject: [Libvirt-cim] [PATCH 1 of 3] Cleanup device_type_from_poolid() in DevicePool In-Reply-To: <87tzmcm2t0.fsf@theine.beaverton.ibm.com> References: <912a37bdd53f3fbf8e13.1198183725@elm3b41.beaverton.ibm.com> <87bq8knm2v.fsf@theine.beaverton.ibm.com> <476BE830.5040204@linux.vnet.ibm.com> <87tzmcm2t0.fsf@theine.beaverton.ibm.com> Message-ID: <476BF3A0.50508@linux.vnet.ibm.com> Dan Smith wrote: > KR> The change to "from_str()" here is so that one would be able to > KR> pass the classname in. The logic for determining the device / > KR> pool type is the same for the InstanceID and the classname. > > Right, but we could potentially need to look at more of the ID in some > cases to determine the type, right? If we had disk pools that > represent LVMs separately from file images or something like that. I > suppose it's reasonable to think that the classname would always > indicate the subtype, but it just seems cleaner to me to always do it > From an ID. Ah, yes - this is a really good point. Hmm.. cu_compare_ref() seems like it could be used , except that the handler would need to construct an instance just for the purpose of comparing it against the ref, which seems a little unnecessary to me. It's probably best to leave device_type_from_poolid() as is, but devise some other way to further make sure the ref is a valid one. Ideally, GetInstance() from Virt_DevicePool should be able to check whether the ref is valid. However GetInstance() also supports refs with mis-matching InstanceIDs and class types. =) So, if this issue is fixed in Virt_DevicePool, the same logic / function could be reused in RAFP and EAFP. I'll see if I can cook up something a little more elegant in Virt_DevicePool. Thanks for the feedback! =) -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Dec 21 19:00:24 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 11:00:24 -0800 Subject: [Libvirt-cim] [PATCH 5 of 5] Add check in RAFP to ensure ref passed is an actual instance In-Reply-To: Message-ID: <3ea63b2076c1d02b7c3c.1198263624@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198263517 28800 # Node ID 3ea63b2076c1d02b7c3c48910809b9fb11ee290f # Parent e029eb82cf076cdf046bdbbfdcc099fef3ec0ec2 Add check in RAFP to ensure ref passed is an actual instance. RAFP currently returns instances for invalid refs where the InstanceID doesn't match the classname type (see failing query). Get the ResourcePool instance that corresponds to the ref using get_pool_inst(). If this fails, the reference is not valid. Failing query: wbemcli ain -ac Xen_ResourceAllocationFromPool 'http://localhost:5988/root/virt:Xen_ProcessorPool.InstanceID="MemoryPool/0"' Signed-off-by: Kaitlin Rupert diff -r e029eb82cf07 -r 3ea63b2076c1 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Fri Dec 21 10:51:16 2007 -0800 +++ b/src/Virt_ResourceAllocationFromPool.c Fri Dec 21 10:58:37 2007 -0800 @@ -183,6 +183,7 @@ static CMPIStatus pool_to_rasd(const CMP CMPIStatus s = {CMPI_RC_OK, NULL}; const char *poolid; uint16_t type; + CMPIInstance *inst; if (!match_hypervisor_prefix(ref, info)) return s; @@ -202,6 +203,9 @@ static CMPIStatus pool_to_rasd(const CMP goto out; } + s = get_pool_inst(_BROKER, ref, &inst); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; rasds_from_pool(type, ref, From kaitlin at linux.vnet.ibm.com Fri Dec 21 19:00:22 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 11:00:22 -0800 Subject: [Libvirt-cim] [PATCH 3 of 5] Roll DevicePool GetInstance() functionality into a seperate function In-Reply-To: Message-ID: <58166b55f2b923859186.1198263622@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198262431 28800 # Node ID 58166b55f2b923859186c9d4bab47778c209e032 # Parent 40de750e13d37994bee0f7031e82f612d02ebe4d Roll DevicePool GetInstance() functionality into a seperate function. Add this function to DevicePool.h so that other providers can use this to get a ResourcePool instance. Signed-off-by: Kaitlin Rupert diff -r 40de750e13d3 -r 58166b55f2b9 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Fri Dec 21 10:21:48 2007 -0800 +++ b/src/Virt_DevicePool.c Fri Dec 21 10:40:31 2007 -0800 @@ -712,47 +712,28 @@ static CMPIStatus return_pool(const CMPI return s; } -static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, - const CMPIContext *context, - const CMPIResult *results, - const CMPIObjectPath *reference) -{ - return return_pool(reference, results, true, false); -} - -static CMPIStatus EnumInstances(CMPIInstanceMI *self, - const CMPIContext *context, - const CMPIResult *results, - const CMPIObjectPath *reference, - const char **properties) -{ - return return_pool(reference, results, false, false); -} - -static CMPIStatus GetInstance(CMPIInstanceMI *self, - const CMPIContext *context, - const CMPIResult *results, - const CMPIObjectPath *reference, - const char **properties) +CMPIStatus get_pool_inst(const CMPIBroker *broker, + const CMPIObjectPath *reference, + CMPIInstance **instance) { CMPIStatus s; - CMPIInstance *inst; + CMPIInstance *inst = NULL; virConnectPtr conn = NULL; const char *id = NULL; const char *prop; if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) { - cu_statusf(_BROKER, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "Missing InstanceID"); goto out; } - conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + conn = connect_by_classname(broker, CLASSNAME(reference), &s); if (conn == NULL) goto out; - inst = get_pool_by_id(_BROKER, conn, id, NAMESPACE(reference)); + inst = get_pool_by_id(broker, conn, id, NAMESPACE(reference)); if (inst) { prop = cu_compare_ref(reference, inst); if (prop != NULL) { @@ -760,17 +741,48 @@ static CMPIStatus GetInstance(CMPIInstan CMPI_RC_ERR_NOT_FOUND, "No such ResourcePool instance (%s)", prop); } - CMReturnInstance(results, inst); - CMSetStatus(&s, CMPI_RC_OK); } else { - cu_statusf(_BROKER, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No such instance `%s'", id); } - out: virConnectClose(conn); + *instance = inst; + + return s; +} + +static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + return return_pool(reference, results, true, false); +} + +static CMPIStatus EnumInstances(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + return return_pool(reference, results, false, false); +} + +static CMPIStatus GetInstance(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s; + CMPIInstance *inst = NULL; + + s = get_pool_inst(_BROKER, reference, &inst); + if ((s.rc == CMPI_RC_OK) && (inst != NULL)) + CMReturnInstance(results, inst); return s; } diff -r 40de750e13d3 -r 58166b55f2b9 src/Virt_DevicePool.h --- a/src/Virt_DevicePool.h Fri Dec 21 10:21:48 2007 -0800 +++ b/src/Virt_DevicePool.h Fri Dec 21 10:40:31 2007 -0800 @@ -74,6 +74,18 @@ CMPIStatus get_all_pools(const CMPIBroke virConnectPtr conn, const char *ns, struct inst_list *list); + +/** + * Get a device pools instance for the given reference + * + * @param broker The current Broker + * @param reference The reference passed to the CIMOM + * @param instance Return corresponding instance + */ +CMPIStatus get_pool_inst(const CMPIBroker *broker, + const CMPIObjectPath *reference, + CMPIInstance **instance); + #endif /* From kaitlin at linux.vnet.ibm.com Fri Dec 21 19:00:23 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 11:00:23 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Add check in EAFP to ensure ref passed is an actual instance In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1198263076 28800 # Node ID e029eb82cf076cdf046bdbbfdcc099fef3ec0ec2 # Parent 58166b55f2b923859186c9d4bab47778c209e032 Add check in EAFP to ensure ref passed is an actual instance. EAFP currently returns instances for invalid refs where the InstanceID doesn't match the classname type (see failing query). Get the ResourcePool instance that corresponds to the ref using get_pool_inst(). If this fails, the reference is not valid. Failing query: wbemcli ain -ac Xen_ElementAllocatedFromPool 'http://localhost:5988/root/virt:Xen_DiskPool.InstanceID="NetworkPool/virbr0"' Signed-off-by: Kaitlin Rupert diff -r 58166b55f2b9 -r e029eb82cf07 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Fri Dec 21 10:40:31 2007 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Fri Dec 21 10:51:16 2007 -0800 @@ -202,6 +202,7 @@ static CMPIStatus pool_to_vdev(const CMP const char *poolid; CMPIStatus s = {CMPI_RC_OK, NULL}; uint16_t type; + CMPIInstance *inst; if (!match_hypervisor_prefix(ref, info)) return s; @@ -223,6 +224,9 @@ static CMPIStatus pool_to_vdev(const CMP goto out; } + s = get_pool_inst(_BROKER, ref, &inst); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; devs_from_pool(type, ref, poolid, list); From kaitlin at linux.vnet.ibm.com Fri Dec 21 19:00:21 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 11:00:21 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] GetInstance() in DevicePool returns an instance for invalid refs In-Reply-To: Message-ID: <40de750e13d37994bee0.1198263621@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198261308 28800 # Node ID 40de750e13d37994bee0f7031e82f612d02ebe4d # Parent 97c1cab36073319f7cf78cbec70eec9eaee01a4d GetInstance() in DevicePool returns an instance for invalid refs. If a ref with a correct InstanceID but non-matching classname is passed, GetInstance() returns an instance that matches the InstanceID. This should return an error. Add cu_compare_ref() after retrieving the instance to make sure ref is valid. Failing query: wbemcli gi 'http://localhost:5988/root/virt:Xen_ProcessorPool.InstanceID="MemoryPool/0"' Signed-off-by: Kaitlin Rupert diff -r 97c1cab36073 -r 40de750e13d3 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Fri Dec 21 09:54:11 2007 -0800 +++ b/src/Virt_DevicePool.c Fri Dec 21 10:21:48 2007 -0800 @@ -739,6 +739,7 @@ static CMPIStatus GetInstance(CMPIInstan CMPIInstance *inst; virConnectPtr conn = NULL; const char *id = NULL; + const char *prop; if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, @@ -753,6 +754,12 @@ static CMPIStatus GetInstance(CMPIInstan inst = get_pool_by_id(_BROKER, conn, id, NAMESPACE(reference)); if (inst) { + prop = cu_compare_ref(reference, inst); + if (prop != NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such ResourcePool instance (%s)", prop); + } CMReturnInstance(results, inst); CMSetStatus(&s, CMPI_RC_OK); } else { From kaitlin at linux.vnet.ibm.com Fri Dec 21 19:00:19 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 11:00:19 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] #2 EAFP and RAFP support invalid references. Message-ID: Updates from last set: -"Cleanup device_type_from_poolid() in DevicePool" - reverted the function name back to device_type_from_poolid() instead of device_type_from_str() -Added two new patches: -"GetInstance() in DevicePool returns an instance for invalid refs." -"Roll DevicePool GetInstance() functionality into a seperate function." -Re-worked EAFP and RAFP patches based on the two new patches. This fix makes it so that EAFP and RAFP do not return instances if an invalid ref is given. These patches are dependant on the "Clean up RAFP and EAFP pool_to_* handlers." patchset. From kaitlin at linux.vnet.ibm.com Fri Dec 21 19:00:20 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 11:00:20 -0800 Subject: [Libvirt-cim] [PATCH 1 of 5] Cleanup device_type_from_poolid() in DevicePool In-Reply-To: Message-ID: <97c1cab36073319f7cf7.1198263620@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1198259651 28800 # Node ID 97c1cab36073319f7cf78cbec70eec9eaee01a4d # Parent 84eb3549e19956d912684a09d58631211724a720 Cleanup device_type_from_poolid() in DevicePool. Change return type to uint16_t to match the device type. Change "Memory" and "Processor" to "MemoryPool" and "ProcessorPool" so that it's more strict. Replace strstr with STARTS_WITH() so that the check is more strict. Signed-off-by: Kaitlin Rupert diff -r 84eb3549e199 -r 97c1cab36073 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Thu Dec 20 10:14:00 2007 -0800 +++ b/src/Virt_DevicePool.c Fri Dec 21 09:54:11 2007 -0800 @@ -268,15 +268,15 @@ char *pool_member_of(const CMPIBroker *b return poolid; } -int device_type_from_poolid(const char *id) -{ - if (strstr(id, "NetworkPool")) +uint16_t device_type_from_poolid(const char *id) +{ + if (STARTS_WITH(id, "NetworkPool")) return VIRT_DEV_NET; - else if (strstr(id, "DiskPool")) + else if (STARTS_WITH(id, "DiskPool")) return VIRT_DEV_DISK; - else if (strstr(id, "Memory")) + else if (STARTS_WITH(id, "MemoryPool")) return VIRT_DEV_MEM; - else if (strstr(id, "Processor")) + else if (STARTS_WITH(id, "ProcessorPool")) return VIRT_DEV_VCPU; else return VIRT_DEV_UNKNOWN; diff -r 84eb3549e199 -r 97c1cab36073 src/Virt_DevicePool.h --- a/src/Virt_DevicePool.h Thu Dec 20 10:14:00 2007 -0800 +++ b/src/Virt_DevicePool.h Fri Dec 21 09:54:11 2007 -0800 @@ -56,11 +56,11 @@ char *pool_member_of(const CMPIBroker *b const char *id); /** - * * Get the device type of a given pool from the pool's InstanceID - * * - * * @param id The InstanceID of the pool - * */ -int device_type_from_poolid(const char *id); + * Get the device type of a given pool from the pool's InstanceID + * + * @param id The InstanceID of the pool + */ +uint16_t device_type_from_poolid(const char *id); /** * Get all device pools on the system for the given connection From kaitlin at linux.vnet.ibm.com Fri Dec 21 19:15:25 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 21 Dec 2007 11:15:25 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] #2 EAFP and RAFP support invalid references. In-Reply-To: References: Message-ID: <476C10CD.8050908@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Updates from last set: > -"Cleanup device_type_from_poolid() in DevicePool" - reverted the function name back to device_type_from_poolid() instead of device_type_from_str() This cleanup patch doesn't really fit in with this set. I can send it separately if need be. > -Added two new patches: > -"GetInstance() in DevicePool returns an instance for invalid refs." > -"Roll DevicePool GetInstance() functionality into a seperate function." I hope adding a new function in this patch doesn't make things too messy. Virt_DevicePool has a lot of helper functions. Once this bug / issue is resolved, I can look into whether any cleanup needs to be done here. > -Re-worked EAFP and RAFP patches based on the two new patches. > > This fix makes it so that EAFP and RAFP do not return instances if an invalid ref is given. > > These patches are dependant on the "Clean up RAFP and EAFP pool_to_* handlers." patchset. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com From yunguol at cn.ibm.com Thu Dec 27 09:03:23 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 27 Dec 2007 17:03:23 +0800 Subject: [Libvirt-cim] HostedResourcePool association provider return expected result with wrong key name or value Message-ID: Hi, I encounter a problem of HostedResourcePool association provider, which can still return expected result with wrong key value, even wrong key name. wbemcli ain -ac Xen_HostedResourcePool http://root:password at localhost/root/virt:Xen_MemoryPool.InstanceID="wrong" localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit" wbemcli ain -ac Xen_HostedResourcePool http://root:password at localhost/root/virt:Xen_MemoryPool.wrong="wrong" localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit" That is mean, with a non existing instance, e.g. a wrong InstanceID name or value as above, it can return results also. Please can you have a look into this? Thanks! Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Dec 28 02:51:08 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 28 Dec 2007 10:51:08 +0800 Subject: [Libvirt-cim] Xen_ResourceAllocationFromPool association provider return expected result with non existing instance of MemResourceAllocationSettingData and ProcResourceAllocationSettingData Message-ID: Hi, >From below test result, we can get MemResourceAllocationSettingData info, there is only one instance of MemResourceAllocationSettingData. wbemcli ain -ac Xen_ResourceAllocationFromPool http://root:password at localhost/root/virt:Xen_MemoryPool.InstanceID="MemoryPool/0" localhost:5988/root/virt:MemResourceAllocationSettingData.InstanceID="Domain-0/mem" However, with a non existing instance of MemResourceAllocationSettingData, the reverse test can return correct results also. wbemcli ain -ac Xen_ResourceAllocationFromPool http://root:password at localhost/root/virt:Xen_MemResourceAllocationSettingData.InstanceID=" wrong" localhost:5988/root/virt:Xen_MemoryPool.InstanceID="MemoryPool/0" Meanwhile, the problem exist in Xen_ProcResourceAllocationSettingData instance. I think maybe this is provider's fault, please who can have a look at this? Thanks!! Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Dec 28 06:21:05 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 28 Dec 2007 14:21:05 +0800 Subject: [Libvirt-cim] Xen_HostedService return expected queried result with non existing instance by two sides Message-ID: Hi, With a non existing instance, e.g. a wrong key name or value, Xen_HostedService still return expected results below: wbemcli ain -ac Xen_HostedService http://root:password at localhost/root/virt:Xen_ResourcePoolConfigurationService.wrong=" wrong" localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit" wbemcli ain -ac Xen_HostedService http://root:password at localhost/root/virt:Xen_HostSystem.CreationClassName=" wrong",Wrong="zeit" localhost:5988/root/virt:Xen_ResourcePoolConfigurationService.CreationClassName="Xen_ResourcePoolConfigurationService",Name="RPCS",SystemCreationClassName="Xen_HostSystem",SystemName="zei" localhost:5988/root/virt:Xen_VirtualSystemManagementService.CreationClassName="Xen_VirtualSystemManagementService",Name="Management Service",SystemCreationClassName="Xen_HostSystem",SystemName="zeit" localhost:5988/root/virt:Xen_VirtualSystemMigrationService.CreationClassName="Xen_VirtualSystemMigrationService",Name="MigrationService",SystemCreationClassName="",SystemName="" Also, some keys value of Xen_VirtualSystemMigrationService are NULL. I think it's maybe provider's fault, the same issue of Xen_HostedResourcePool and Xen_ResourceAllocationFromPool, which have been reported before. Please who can have a look into them? Thanks a lot! Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Dec 28 09:51:50 2007 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 28 Dec 2007 17:51:50 +0800 Subject: [Libvirt-cim] Xen_ElementCapabilities return expected result from one side querying by non existing instance Message-ID: With a non existing instance, e.g. a wrong key name or value, Xen_VirtualSystemManagementCapabilities still return expected results below: wbemcli ain -ac Xen_ElementCapabilities http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities.InstanceID=" wrong" localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit" wbemcli ain -ac Xen_ElementCapabilities http://root:password at localhost/root/virt:Xen_VirtualSystemManagementCapabilities. Wrong="wrong" localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit" The same problem with Xen_VirtualSystemMigrationCapabilities. In conclusion, four association providers have the same problems, that is still return expected result with non existing instance from one or two sides querying. They are Xen_HostedResourcePool, Xen_ResourceAllocationFromPool, Xen_HostedService and Xen_ElementCapabilities. Please who can have a look into them? Thanks a lot! Best, Regards Daisy Guo Lian Yun E-mail: yunguol at cn.ibm.com IBM China Development Lab, Shanghai, China TEL: (86)-21-61008057 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Fri Dec 28 22:28:53 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 28 Dec 2007 14:28:53 -0800 Subject: [Libvirt-cim] [PATCH] HRP accepts invalid references Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1198880883 28800 # Node ID e84ead6a0242ecb1cf63e871da8603d38233ff41 # Parent 3ea63b2076c1d02b7c3c48910809b9fb11ee290f HRP accepts invalid references. Add a get_host_cs() call to pool_to_sys() handler. The get_host_cs() call will verify whether the reference passed in is valid. This patch is dependant on the "#2 EAFP and RAFP support invalid references" patchset. Failing query: wbemcli gi 'http://localhost/root/virt:Xen_MemoryPool.InstanceID="wrong"' Signed-off-by: Kaitlin Rupert diff -r 3ea63b2076c1 -r e84ead6a0242 src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Fri Dec 21 10:58:37 2007 -0800 +++ b/src/Virt_HostedResourcePool.c Fri Dec 28 14:28:03 2007 -0800 @@ -43,8 +43,13 @@ static CMPIStatus pool_to_sys(const CMPI { CMPIInstance *host; CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst; if (!match_hypervisor_prefix(ref, info)) + return s; + + s = get_pool_inst(_BROKER, ref, &inst); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) return s; s = get_host_cs(_BROKER, ref, &host); From kaitlin at linux.vnet.ibm.com Fri Dec 28 22:23:56 2007 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 28 Dec 2007 14:23:56 -0800 Subject: [Libvirt-cim] HostedResourcePool association provider return expected result with wrong key name or value In-Reply-To: References: Message-ID: <4775777C.3080401@linux.vnet.ibm.com> Guo Lian Yun wrote: > Hi, > > I encounter a problem of HostedResourcePool association provider, which > can still return expected result with wrong key value, even wrong key name. > > wbemcli ain -ac Xen_HostedResourcePool > http://root:password at localhost/root/virt:Xen_MemoryPool.InstanceID="wrong" > localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit" > > wbemcli ain -ac Xen_HostedResourcePool > http://root:password at localhost/root/virt:Xen_MemoryPool.wrong="wrong" > localhost:5988/root/virt:Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="zeit" > > That is mean, with a non existing instance, e.g. a wrong InstanceID name > or value as above, it can return results also. > Please can you have a look into this? Thanks! > Hi Daisy - this looks like a bug. I've just submitted a patch that should fix the problem. -- Kaitlin Rupert IBM Linux Technology Center karupert at us.ibm.com