WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-cim

[Xen-cim] CMPI support of arrays in OUT params

To: "Gareth S Bestor" <bestorga@xxxxxxxxxx>
Subject: [Xen-cim] CMPI support of arrays in OUT params
From: "Jim Fehlig" <jfehlig@xxxxxxxxxx>
Date: Wed, 24 Jan 2007 13:59:53 -0700
Cc: xen-cim@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 24 Jan 2007 12:59:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-cim-request@lists.xensource.com?subject=help>
List-id: xen-cim mailing list <xen-cim.lists.xensource.com>
List-post: <mailto:xen-cim@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-cim-bounces@xxxxxxxxxxxxxxxxxxx
It appears CMPI (1.3 or 2.0) does not support extrinsic method OUT params that 
are arrays.  For the VirtualSystemManagementService provider, arrays of 
references are problematic.  AddResourceSettings() and ModifyResourceSettings() 
both have OUT params that are reference arrays.  OpenWBEM does not support this 
- segfaults when calling something like:

CMAddArg(argsout, "OutSettings", (CMPIValue*)&array, CMPI_refA);

I have not tried Pegasus but would expect the same -- well, hopefully it fails 
more gracefully :-).

I do not plan to support AddResourceSettings, ModifyResourceSettings and 
RemoveResourceSettings in CIM_VirtualSystemManagementService and instead 
support AddResourceSetting, ModifyResourceSetting and RemoveResourceSetting 
(notice the singular setting) in our derived management service class.  A 
single reference will be returned in these versions, side-stepping the above 
issue.

Frankly, the plural versions suck anyway :-).  I came to this conclusion while 
implementing AddResourceSettings. Implementation is difficult, particularly 
handling errors.  Imagine successfully adding 2 resources but failing on the 
3rd.  Do you fail the whole thing and attempt to unwind (and perhaps fail doing 
that!)? Or do you proceed forward and indicate half failure?  I don't like it 
and considered the 'one-at-a-time' approach before hitting the 'output array' 
issue.

I will proceed with this approach unless (strongly) convinced otherwise.

Jim




_______________________________________________
Xen-cim mailing list
Xen-cim@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-cim

<Prev in Thread] Current Thread [Next in Thread>