Re: question on CBEnumInstances

kamal jeera <[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <[email protected]>
thanks much Marek! I will check that out.



On Tue, Oct 26, 2010 at 3:48 AM, Marek Szermutzky <[email protected]>wrote:

> Hi!
>
>
> On the function,
> inline static CMPIEnumeration *CBEnumInstances(
>     const CMPIBroker * mb,
>     const CMPIContext * ctx,
>     const CMPIObjectPath * op,
>     const char ***properties*,
>     CMPIStatus * rc)
>
>
> the input parameter "properties" may hold a property list, meaning you can
> filter all instances to only return with the properties named in
> "properties".
> Today the CMPI interface does not allow to filter for certain instances
> based on a property value on CBEnumInstances().
>
> What you could do instead to achieve your target is to execute a query
> using the
>
> CMPIStatus (*execQuery) (CMPIInstanceMI*,const CMPIContext*,const
> CMPIResult*,const CMPIObjectPath*,const char*,const char*);
>
> or its corresponding macro version:
>
> /**
>     Query the enumeration of instances of the class (and subclasses)
> defined
>     by &lt;op&gt; using &lt;query&gt; expression.
>     @param mb Broker this pointer.
>     @param ctx Context object
>     @param op ObjectPath containing namespace and classname components.
>     @param query Query expression
>     @param lang Query Language
>     @param rc Output: Service return status (suppressed when NULL).
>     @return Resulting eumeration of Instances.
> */
> inline static CMPIEnumeration *CBExecQuery(
>     const CMPIBroker * mb,
>     const CMPIContext * ctx,
>     const CMPIObjectPath * op,
>     const char *query,
>     const char *lang,
>     CMPIStatus * rc);
>
> The most performant way for this to work would be if the provider
> implementing the class you want to query does support queries natively and
> is capable to execute on queries.
>
> Mit freundlichen Grüßen / Kind regards
> Marek Szermutzky
>
> Software Engineer / OpenPegasus Maintainer (PMC) and z/OS PlatformRep.
> 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 / Vorsitzender des
> Aufsichtsrats: Martin Jetter
> Geschäftsführung: Dirk Wittkopp
> Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart,
> HRB 243294
>
>
>
> From:        kamal jeera <[email protected]>
> To:        [email protected]
> Date:        25.10.2010 19:56
> Subject:        Re: question on CBEnumInstances
> ------------------------------
>
>
>
> forgot to add that,  the reason I want to that is.....
>
> the class that I am trying to do enumerateIntstance has tons of instances,
> and it is taking lot of time to to go through all of those and chose the one
> I want.
>
> It would be nice if CBEnumInstances can filter out the results.
>
>
>
>
> On Mon, Oct 25, 2010 at 10:50 AM, kamal jeera <*[email protected]*<[email protected]>>
> wrote:
> Hi All,
>
> I have a question on CBEnumInstances.
> inline static CMPIEnumeration *CBEnumInstances(
>     const CMPIBroker * mb,
>     const CMPIContext * ctx,
>     const CMPIObjectPath * op,
>     const char ***properties*,
>     CMPIStatus * rc)
>
>
> I am trying to enumerate instances of a class.
>
> I would like to filter my results based on certain *property value,* how
> can I do that?
>
> Lets for example I would like to filter results from CBEnumInstances to
> just show the instances of class which has property has GatheringType = 3
>
> I am not sure if can specify value for const char ***properties*.
>
> thanks,
> Hemanth
>
>
>
>
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.