RE: RE: modify association provider

<[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <57607AA731156C4F8BA00A0C2565670505BAE559@CORPUSMX40B.corp.emc.com>
GetInstance on $A1.More should return the instance of X aliased as $X1.

 

George

 

From: [email protected] [mailto:[email protected]] 
Sent: Thursday, July 08, 2010 6:04 PM
To: Ericson, George; [email protected]
Cc: [email protected]; [email protected]; [email protected];
[email protected]
Subject: Re: RE: modify association provider

 

Hi George,

For instance, I have $A1 and I want to retrieved the Instances of $X1
with all properties besides the key ones.
I thought that was simple like X* inst = $A1->More, but is not enough.

I think I will try tomorrow:

Ref<Instance> ref = cimom::get_instance("root/cimv2", $A1->More);
X* inst = cast<X*>(ref.ptr());


Ricardo



On Jul 8, 2010 10:06pm, [email protected] wrote:
> 
> 
> 
> 
> 
> Ricardo,
> 
> 
>  
> 
> 
> I'm not clear in your example what is what.  Please
> provide simple class description and then relate your operations to
the CIM
> operations.  For instance:
> 
> 
>  
> 
> Class
> X {
> 
>                 String
> InstanceID;
> 
>                 String
> moreInfo;
> 
> }
> 
> Class
> Y {
> 
>                 String
> InstanceID;
> 
>                 Uint32
> Status;
> 
> }
> 
> Class
> A {
> 
>                 X
> REF More;
> 
>                 Y
> REF Status;
> 
> }
> 
> Instance
> of X as $X1{
> 
>                 moreInfo="I'm
> Fine"
> 
> };
> 
> Instance
> of Y as $Y1{
> 
>                 Status=15;
> 
> };
> 
> Instance
> of A as $A1{
> 
>                 More=$X1
> 
>                 Status=$Y1
> 
> };
> 
> 
> 
> 
> Thanks,
> 
> 
> George
> 
> 
>  
> 
> 
> -----Original Message-----
> 
> From: Ricardo Mendes [mailto:[email protected]] 
> 
> Sent: Thursday, July 08, 2010 6:42 AM
> 
> To: Tim Potter
> 
> Cc: John McLaughlin; Kirk Augustin; [email protected]
> 
> Subject: Re: modify association provider
> 
> 
>  
> 
> 
> Hi,
> 
> 
>  
> 
> 
> Thanks once again for your explanations.
> 
> 
>  
> 
> 
> I'm facing other problem, that is about the association
> references.
> 
> 
> I have my association Instance (Instance_A) and I want
> one of it
> 
> 
> associated instances (Instance_A1),
> 
> 
> When I do : Instance_A->Instance_A1 to retrieve the
> associated
> 
> 
> instance, it is incomplete because I can only get the key
> properties
> 
> 
> and the others are empty.
> 
> 
>  
> 
> 
> How can I the get the instance with all properties?
> 
> 
>  
> 
> 
> I'm using CIMPLE and the instances are stored in a
> Instance_Map.
> 
> 
>  
> 
> 
> Thanks in advance,
> 
> 
> Ricardo Mendes
> 
> 
>  
> 
> 
>  
> 
> 
> On Thu, Jul 8, 2010 at 1:01 AM, Tim Potter
> [email protected]> wrote:
> 
> 
> > There's also the very rare three-way association.
>  From the depths of the
> 
> 
> > SMI-S schema the
> CIM_SCSIInitiatorTargetLogicalUnitPath associates an
> 
> 
> > initiator and target protocol endpoint with a
> storage extent.
> 
> 
> > 
> 
> 
> > Tim.
> 
> 
> > On 08/07/2010, at 6:28 AM, John McLaughlin wrote:
> 
> 
> > 
> 
> 
> > Actually, an Association object can carry data as
> well (see SMI-S BasedOn
> 
> 
> > and CompositeExtentBasedOn).  These objects can
> be retrieved with a
> 
> 
> > "references()" call from either end of
> the association, and their
> 
> 
> > CIMObjectPaths from a "referenceNames()"
> call.  I have not done this, but I
> 
> 
> > assume you can (if your provider supports it as an
> Instance provider in
> 
> 
> > addition to being an Association provider) simply
> call the
> 
> 
> > "modifyInstance()" or
> "setProperty()" methods to modify the object.
> 
> 
> > 
> 
> 
> > However, if you are not the provider developer
> there's no assurance that the
> 
> 
> > Association provider was created to support any or
> all of these features.
> 
> 
> > 
> 
> 
> > John
> 
> 
> > 
> 
> 
> > 
> 
> 
> > 
> 
> 
> > 
> 
> 
> > John McLaughlin
> 
> 
> > iStor Networks, Inc.
> 
> 
> > 
> 
> 
> > ________________________________
> 
> 
> > From: Kirk Augustin
> [mailto:[email protected]]
> 
> 
> > Sent: Tuesday, July 06, 2010 5:18 PM
> 
> 
> > To: Ricardo
> Mendes; [email protected]
> 
> 
> > Subject: Re: modify association provider
> 
> 
> > 
> 
> 
> > Not sure exactly what you mean.
> 
> 
> > And association is just an object that hold the
> paths of 2 other objects, so
> 
> 
> > that they can be linked in a query and each found.
> 
> 
> > The association provider copies the paths into the
> association instance, but
> 
> 
> > does not change or effect the actual instances that
> it linked together, so
> 
> 
> > should not be expected to call those instance
> providers.
> 
> 
> > But since your provider must have the paths of each
> object, then it could
> 
> 
> > also access and modify them if it wanted to.
> 
> 
> > However, it would be somewhat inappropriate for an
> association provider to
> 
> 
> > do that.
> 
> 
> > 
> 
> 
> > ________________________________
> 
> 
> > 
> 
> 
> > From: Ricardo Mendes
> [email protected]>
> 
> 
> > To: [email protected]
> 
> 
> > Sent: Tue, July 6, 2010 4:15:25 PM
> 
> 
> > Subject: modify association provider
> 
> 
> > 
> 
> 
> > Hi Everybody,
> 
> 
> > 
> 
> 
> > I have one association provider, if I modify one of
> it's associated
> 
> 
> > providers trough the association provider, should
> the modify_instance
> 
> 
> > of the associated provided be invoked?
> 
> 
> > Mine isn't being invoked, which is a problem for me.
> 
> 
> > 
> 
> 
> > Thanks in advance,
> 
> 
> > RM
> 
> 
> > 
> 
> 
>  
> 
> 
>  
> 
> 
> 
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.