Re: CIMOM refuses EmbeddedObject with unknown class
Jan Safranek <[email protected]> Thu, 01 Aug 2013 12:57:58 +0200
| Newsgroups | gmane.network.open-pegasus.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, there has been quite lot of time since I reported the issue below (now tracked also as bug 9721) and I still need some solution. And frankly, I have no idea where to start when fixing something like this. Could you please at least point me where to look to allow CMPI providers to create instances of unknown classes? Jan On 03/14/2013 09:08 AM, Marek Szermutzky wrote: > 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 > >