Re: Getting incomplete object path
Kirk Augustin <[email protected]>
| Newsgroups | gmane.network.open-pegasus.general |
|---|---|
| Message-ID | <[email protected]> |
I don't remember, but I would have expected key-pairs. But when getInstance is called, the key-pairs are passed in, so perhaps it could be rationalized that one already has them? Sorry, but I have been doing mostly Windows WBEM lately, so can't just easily try it to see. Kirk Augustin 11821 NW McNamee Rd Portland, OR 97231 HM: 503-289-4356 >________________________________ > From: Pranav S <[email protected]> >To: Kirk Augustin <[email protected]> >Cc: Devchandra Leishangthem <[email protected]>; "[email protected]" <[email protected]>; Venkateswara R Puvvada <[email protected]> >Sent: Wednesday, April 18, 2012 9:40 AM >Subject: Re: Getting incomplete object path > > >I agree on namespace, But what about the Key-Pairs? >" A key is a property or set of properties used to uniquely identify an instance of a class. Key properties are marked with the KEY qualifier. " > >I do not see key pairs either in my instance Object path. After priting it all that I see is Class Name, no key pairs, weird. >I see key-pair values in class mof. > > >On 18 April 2012 20:01, Kirk Augustin <[email protected]> wrote: > >I am not sure, but I believe there is optional behavior. >>Consider the section I made 12 pt and bold below. >> >> >> >>{ ... >>public class CIMObjectPath >>extends java.lang.Object >>implements java.io.Serializable >>Path to the specified CIM class or CIM instance or CIM qualifier. The CIM object path is a reference to CIM elements. It is only valid in context of an active connection to a CIM object manager on a host. In order to uniquely identify a given object on a host, it includes the namespace, object name, and keys (if the object is an instance). The namespace is taken to be relative to the namespace that the CIMClient is currently connected to. A key is a property or set of properties used to uniquely identify an instance of a class. Key properties are marked with the KEY qualifier. >>For example, the object path: >>\\myserver\Root\cimv2\Solaris_ComputerSystem.Name=mycomputer: CreationClassName=Solaris_ComputerSystem >>has two parts: >> * \\myserver\Root\cimv2 - The default CIM namespace on host myserver. >> * Solaris_ComputerSystem.Name=mycomputer, CreationClassName=Solaris_ComputerSystem - A specific Solaris Computer System object in the default namespace on host myserver. This Solaris computer system is uniquely identified by two key property values in the format (key property = value): >> * Name=mycomputer >> * CreationClassName=Solaris_ComputerSystem >>... } >> >>http://wbemservices.sourceforge.net/javadoc/api.1109/javax/wbem/cim/CIMObjectPath.html >>http://wbemservices.sourceforge.net/javadoc/api.1109/javax/wbem/cim/CIMObjectPath.html >> >>Kirk Augustin >>11821 NW McNamee Rd >>Portland, OR 97231 >> >> >>HM: 503-289-4356 >> >> >>>________________________________ >>> From: Pranav S <[email protected]> >>>To: Kirk Augustin <[email protected]> >>>Cc: Devchandra Leishangthem <[email protected]>; "[email protected]" <[email protected]>; Venkateswara R Puvvada <[email protected]> >>>Sent: Wednesday, April 18, 2012 5:27 AM >>> >>>Subject: Re: Getting incomplete object path >>> >>> >>>Exactly Kirk, Bang on target. ..!! >>> >>>I am not getting namespace and key-pair values in object path when I print the CIMInstance' object path. I see only class name of the instance. >>>Is it expected behaviour? >>> >>> >>> >>>On 18 April 2012 09:30, Kirk Augustin <[email protected]> wrote: >>> >>>That was the confusion I had at first as well. >>>>As you say, enumerateInstances and EnumerateInstanceNames must not return the same, or else there would be no point in having both. >>>>But now I understand that he was comparing what is return by enumerateInstances, with what is returned by first using EnumerateInstanceNames and then using getInstance on each item in the names list. >>>>And I think he is saying the properties are all there in what is returned, but not the server namespace. >>>> >>>> >>>>Kirk Augustin >>>>11821 NW McNamee Rd >>>>Portland, OR 97231 >>>> >>>> >>>>HM: 503-289-4356 >>>> >>>> >>>>>________________________________ >>>>> From: Devchandra Leishangthem <[email protected]> >>>>>To: Pranav S <[email protected]> >>>>>Cc: Kirk Augustin <[email protected]>; "[email protected]" <[email protected]>; Venkateswara R Puvvada <[email protected]> >>>>>Sent: Tuesday, April 17, 2012 8:38 PM >>>>> >>>>>Subject: Re: Getting incomplete object path >>>>> >>>>> >>>>> >>>>>They are rather not equal. If they are equal, why do we need both enumerateInstances and EnumerateInstanceNames, when only one is sufficient. >>>>>As being mentioned in the mail chain by Kirk and Hwang. >>>>> >>>>>class Person { >>>>> [key]String name; >>>>> Uint32 age; >>>>>} >>>>> >>>>>InstanceName:- >>>>> nameSpace:/Person.name=Pranav ==> This will give enough info to locate the instance in the repository. But this itselt is different from Instance >>>>>Person >>>>>{ >>>>>name=Pranav; >>>>>age=x; >>>>>}; >>>>>where x is some unsinged int; >>>>> >>>>>Warm Regards >>>>>D>L> Meetei >>>>>IBM India System and Technology Lab >>>>>EGL -D,Bangalore, India >>>>> >>>>> >>>>> >>>>>From: Pranav S <[email protected]> >>>>>To: Kirk Augustin <[email protected]>, >>>>>Cc: Venkateswara R Puvvada/India/IBM@IBMIN, "[email protected]" <[email protected]> >>>>>Date: 04/17/2012 10:46 PM >>>>>Subject: Re: Getting incomplete object path >>>>>>>>>>________________________________ >>>>> >>>>> >>>>> >>>>>Small correction, I should have used CIMInstance, >>>>> >>>>>Array<CIMInstance> enumerateInstances() == { >>>>> >>>>> Array<CIMObjectPath> instaNames = enumerateInstanceNames(); >>>>> Array<CIMInstance> compInstanace[i]; >>>>> for(i=0; i<instaNames.size(), i++) >>>>> compInstanace[i] = getInstance(instanceNames[i])); >>>>> } >>>>> >>>>> >>>>>On 17 April 2012 22:40, Pranav S <[email protected]> wrote: >>>>>Hey Kirk, >>>>>Pegasus::enumerateInstances should be equal to Pegasus::enumerateInstanceNames and running Pegasus::getInstance over each individual Pegasus::CIMObjectPath returned from enumerateInstanceNames. >>>>> >>>>>Array<CIMObjectPath> enumerateInstances() == { >>>>> Array<CIMObjectPath> instaNames = enumerateInstanceNames(); >>>>> Array<CIMObjectPath> compInstanace[i]; >>>>> for(i=0; i<instaNames.size(), i++) >>>>> compInstanace[i] = getInstance(instanceNames[i])); >>>>> } >>>>>Let me know if I am still wrong here.. >>>>> >>>>>On 17 April 2012 22:23, Kirk Augustin <[email protected]> wrote: >>>>>It is not clear to me what the concern is? >>>>> >>>>>GetInstance() and enumerateInstances() return complete instances of objects in the search criteria, unless filtered by a passed in property list. >>>>>But enumerateInstanceNames() does not return complete instances. It only returns namespace and key property values sufficient so that getInstance() could be used to get the rest. >>>>> >>>>>Pegasus::enumerateInstances should not be equal to Pegasus::enumerateInstanceNames. >>>>>It should return the same number of instances, but not the same amount of information about each instance. >>>>> >>>>>While Pegasus::getInstance and Pegasus::enumerateInstances could return different number of instances, but should have the same amount of information about each instance. >>>>> >>>>> >>>>>Kirk Augustin >>>>>11821 NW McNamee Rd >>>>>Portland, OR 97231 >>>>> >>>>>HM: 503-289-4356 >>>>>>>>>>________________________________ >>>>>From: Pranav S <[email protected]> >>>>>To: Venkateswara R Puvvada <[email protected]> >>>>>Cc: [email protected] >>>>>Sent: Tuesday, April 17, 2012 9:10 AM >>>>>Subject: Re: Getting incomplete object path >>>>> >>>>>Hey Venkat, >>>>> >>>>>I did not get what is wrong here, even DMTF says the same and Pegasus is one of the implementation. Pegasus::enumerateInstances should be equal to Pegasus::enumerateInstanceNames, running Pegasus::getInstance over each individual Pegasus::CIMObjectPath retyrned from enumerateInstanceNames. I am not getInstance will return an array. >>>>> >>>>> >>>>>On 17 April 2012 19:50, Pranav S <[email protected]> wrote: >>>>>That's cool Venkat, Thank You for pointing me to the cause for this behaviour. >>>>> >>>>> >>>>> >>>>>On 17 April 2012 17:29, Venkateswara R Puvvada <[email protected]> wrote: >>>>>Per the DMTF specification, the GetInstance operation returns an <instance> >>>>>whereas EnumerateInstances returns <namedInstance>*. So, the return value >>>>>from GetInstance is not expected to include the instance name. Please refer >>>>>to the Specification for CIM Operations over HTTP: >>>>> >>>>>http://www.dmtf.org/sites/default/files/standards/documents/DSP200.html >>>>> >>>>> >>>>>Regards, >>>>>Venkat >>>>> >>>>> >>>>> >>>>> >>>>>From: Pranav S <[email protected]> >>>>>To: [email protected], >>>>>Date: 04/14/2012 11:34 AM >>>>>Subject: Getting incomplete object path >>>>> >>>>> >>>>> >>>>>Hello, >>>>> >>>>>I am enumerating a class instance names(Pegasus::CIMObjectPaths') using >>>>>Pegasus::enumerateInstanceNames and after that doing Pegasus::getInstance >>>>>on the obtained object paths. I get entire instance details, but the object >>>>>path inside the obtained Pegasus::CIMInstance, is incomplete, it shows only >>>>>the creation class name, rest of the details are not embedded in the >>>>>Pegasus::CIMObjectPath. I see the instance properties but only object path >>>>>is incomplete. >>>>>Can some one spread some light on the issue? >>>>> >>>>>I am using OpenPegasus 2.11.1 for client and my Cim server and provider is >>>>>from EMC. >>>>> >>>>>Is this EMC cim server/provider issue? >>>>> >>>>>-- >>>>>Thanks, >>>>>Pranav >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>-- >>>>>Thanks, >>>>>Pranav >>>>> >>>>> >>>>> >>>>> >>>>>-- >>>>>Thanks, >>>>>Pranav >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>-- >>>>>Thanks, >>>>>Pranav >>>>> >>>>> >>>>> >>>>> >>>>>-- >>>>>Thanks, >>>>>Pranav >>>>> >>>>> >>>>> >>>>> >>> >>> >>>-- >>>Thanks, >>>Pranav >>> >>> >>> >>> > > >-- >Thanks, >Pranav > > > >