Earlier I sent an email mentioned that no search or filter was specified in
the spec. Which was true in earlier specs. Doug pointed out that in the
newer CIMI spec section 4.1.1.6 actually does support it. Here is what the
spec will do to address that.
/machines?CIMISelect=*,machines[href.name=mine]
Notice the bracket at the end of an attribute name, The above described
mechanism was added somewhere between 0.0.50 and 0.0.55b.
Thanks.
Tong Li
Emerging Technologies & Standards
Building 501/B205
[email protected]
David Lutterkort <[email protected]> wrote on 12/09/2011 07:56:53 PM:
> From: David Lutterkort <[email protected]>
> To: [email protected]
> Date: 12/09/2011 07:57 PM
> Subject: Re: CIMI: CIMISelect filter added
>
> On Thu, 2011-12-08 at 13:19 +0100, [email protected] wrote:
> > Practically it will display a full Machine entity instead of
> > reference. Currently the Collection models are defined to hold
> only references.
> > I was thinking about adding something like:
> >
> > array :machines do
> > scalar :href
> > inherit :machine
> > end
> >
> > The 'inherit' method will 'copy' schema from Machine model to
thisArray, so
> > then the CIMIExpand parameter should be used properly (Collection
> entity will
> > contain a full entity with all properties).
>
> I haven't thought through this in code, but my gut feeling says we need
> to tie the href and the object that it references together more tightly,
> i.e. I think we'd need something like
>
> array :machines do
> reference :machine, :attribute => :href
> end
>
> where :href is the default for :attribute. At that point, we should
> probably copy Rails even farther and say
>
> has_many :machines, :attribute => :href, :class => Machine
>
> where :attribute and :class default to :href and Machine
> (singularization of the association name)
>
> One of the advantages of tying things together like that is that it
> gives us a lot of flexibility if the association itself should gain
> attributes in a future draft, e.g. so that the collection of volumes
> attached to a machine gets its own URL.
>
> And we probably want a has_one, too.
>
> David
>
>
>