Re: CIMOM refuses EmbeddedObject with unknown class
Marek Szermutzky <[email protected]> Thu, 14 Mar 2013 09:08:04 +0100
| Newsgroups | gmane.network.open-pegasus.general |
|---|---|
| Message-ID | <OFC060E2B0.1DF2B0C2-ONC1257B2E.002BE1DC-C1257B2E.002D54B1@de.ibm.com> |
I think I will give this one a try, so it gets fixed as quick as possible. Also, everyone else probably would first have to dig into that code. I have a question though, your implementation of the Job Control Profile .. will it be published OpenSource ? Asking, because if it is freely available today I could use that for testing. If you have further question and want a short turn-around, you are welcome to visit us(the OP Architecture Team) in our IRC channel. IRC channel at irc://irc6.oftc.net/openpegasus (IPV6) or irc://irc.oftc.net/openpegasus (IPV4). Channel name: openpegasus Server webpage: http://www.oftc.net/oftc/ Kind regards, Marek Szermutzky Software Engineer / OpenPegasus Maintainer (PMC) IBM Systems &Technology Group, Systems Software Development / z/OS Capacity Management and Support ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Schoenaicher Str. 220 71032 Boeblingen Phone: +49-7031-16-5182 E-Mail: [email protected] ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Research & Development GmbH / Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294 From: Marek Szermutzky/Germany/IBM@IBMDE To: Jan Safranek <[email protected]> Cc: Vitezslav Crhonek <[email protected]>, Andreas Maier/Germany/IBM@IBMDE, "[email protected]" <[email protected]>, Robert Kieninger/Germany/IBM@IBMDE Date: 13.03.2013 16:44 Subject: Re: CIMOM refuses EmbeddedObject with unknown class ---------- Hi ! Good to have you on the mailing list and thank you for reporting this problem. It looks like you are the first one trying to implement Job control, not too surprising though since the profile only was published in May 2012. EmbeddedInstance/EmbeddedObject support works well perfectly fine in OpenPegasus as long as instances are based on a registered class (known and full defined class). To be honest ... this arbitrarily generated class "__MethodParameters" was a big surprise to me. My first reaction was to call it a "dirty trick" and asking for who introduced that concept of a "virtual" class in the DMTF CIM Schema definition. ;) But I understand your situation and that this nothing you chose to do. Let me try to give you a short description on the background and the reason this doesn't work right now. The design approach in OpenPegasus for CMPI is to have instances always be based on a defined class like programming languages do. There you cannot create an instance of a class without having the class defined. This has several advantages, obvious things like type-safety and stability but also in the area of footprint and performance. What I am trying to say is that with OpenPegasus 2.12.0 I see no easy circumvention which would allow to implement the indication that uses "__MethodParameters" (that indication is an optional feature in Job Control Profile). I discussed this with one of my fellows (Robert Kieninger), we invented the SCMO model in OpenPegasus together (we made that "instance based on class only" design decision). We came to the conclusion that supporting this "__MethodParameters" needs some code changes and a feature addition to the Single Chunk Memory Object Model. We basically would add a flag to our internal representation of classes which says: "virtual". On these "virtual" classes we would allow "user-defined properties" to be added, just as "user-defined key properties". Assuming "__MethodParameters" would be registered with the CIM Server as an empty class and flagged as "virtual", you now could create CMPI instances from that class and freely add whatever properties required. The advantage of such an approach is that we do not lose the performance advantage existing providers, as well as the type-safety for provider creating instances for defined classes. I have not done a full analysis on the necessary code changes (effort?) to implement support for such "virtual" classes, but I believe this would be the right solution to the Job Control Profile issue. I do not know the time frame in which you would need this fixed, but assuming OpenPegasus 2.13 with Release Date of 15 July 2013 is sufficient, can you imagine working your code and test cases in a way that you would register a class "__MethodParameters" in OpenPegasus which holds the parameters for all methods used in your testing (that's the quick hack around the problem I see) ? But maybe someone else has a proposal for a quicker solution or circumvention ? Putting Andreas Maier (Andy) on CC. Andy ? Do you think we can find someone in IBM to pick up the work necessary to implement this "virtual" classes concept in SCMO and CMPI ? Kind regards, Marek Szermutzky Software Engineer / OpenPegasus Maintainer (PMC) IBM Systems &Technology Group, Systems Software Development / z/OS Capacity Management and Support ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Schoenaicher Str. 220 71032 Boeblingen Phone: +49-7031-16-5182 E-Mail: [email protected] ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Research & Development GmbH / Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294 From: Jan Safranek <[email protected]> To: [email protected] Cc: Vitezslav Crhonek <[email protected]> Date: 13.03.2013 10:22 Subject: Re: CIMOM refuses EmbeddedObject with unknown class ---------- On 03/13/2013 09:22 AM, Jan Safranek wrote: > I have a CMPI provider for CIM_MethodResult class under Pegasus 2.12.0. > It has EmbeddedInstance('CIM_InstMethodCall') property PostCallIndication. > > This CIM_InstMethodCall class has EmbeddedObject property > MethodParameters and description of the property says: > > The parameters of the method, formatted as an EmbeddedObject (with a > predefined class name of "__MethodParameters". > > Now if I set the MethodParameters property with CIM instance of > not-existing "__MethodParameters" class in my provider, Pegasus returns > CMPI_RC_ERR_NOT_FOUND from > src/Pegasus/ProviderManager2/CMPI/CMPI_BrokerEnc.cpp:mbEncNewInstance() > > If I try to use "CIM_ManagedElement" as classname of the embedded object > just for testing, Pegasus shows correct property, i.e. these > EmbeddedInstances and EmbeddedObjects work well for registered classes. Well, it does not work so well... I can add only properties specified for CIM_ManagedElement, I cannot add parameters of the method as properties - the parameter names (=name of __MethodParameters properties) are different for each method which starts a job. Am I the first one, who tries to implement job control? How can I return an output parameter from a method, which created a job, without using embedded instance? Whole CIM is full of these methods... Do I miss something? Jan