CIMI does not define any search/filtering mechanism. To me this is a big
oversight especially considering this spec is really Cloud (large number of
entities by default) related. I would love to see if a design for getting
sources is search centric, that is, consider all the get operations are
search operations with various filtering conditions. The code specifically
looks for named attributes may not be flexible enough.

just my 2 cents.

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
>
>
>

Reply via email to