Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 229602

Re: Browse inventory item created by a plugin?

$
0
0

Hi All,

 

This has been fixed in the upcoming release of the plug-in.

 

The VCACHost is an internal type for vCO (virtual type). So querying for a host is pretty simple, you just pass a string, and if it matches the id or the name of the host, it will be returned.

For instance:

Server.findAllForType("vCAC:VCACHost" , “abc”);

will return the vcac host which has "abc" in its name or id.

 

Filtering inventory objects however follows the OData URI standards and the query has to be structured according to the system query option as described here:

http://www.odata.org/documentation/odata-v2-documentation/uri-conventions/#45_Filter_System_Query_Option_filter

 

Here’s a simple example:

Server.findAllForType("vCAC:Blueprint" , “VirtualMachineTemplateName eq 'simple_blueprint_name'”);

 

Meanwhile, as a workaround you can iterate the host collection and filter by hand.

 

Another feature that will be available in the release version of the plug-in is the ability to apply system query options such as $filter, $select, $orderby, $top and $skip, so that users will be able to invoke operations other than strict equals filters.


Viewing all articles
Browse latest Browse all 229602

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>