Hi All,
One way to get catalog resources for a request is to get all resources and compare catalog id to resource request id.
var allItems = vCACCAFEEntitiesFinder.getCatalogResources(vcacCafeHost);
var count = 0;
while(allItems.length > count)
{
if(allItems[count].requestId == requestId)
{
deployedCatalogResource.push(allItems[count]);
}
count++;
}
Is there a efficient way to get resources?
I am not able get it working as described Sergio @ VMware Blog I
i.e. retrieve all resources for a request. I have tried "requestId", "request_id","requestid/ref" filter param in the following code. It throws "Invalid data access API use"
var service = vcacCafeHost.createCatalogClient().getCatalogConsumerResourceService();
var filter = new Array();
filter[0] = vCACCAFEFilterParam.equal("request_id", vCACCAFEFilterParam.string("dcb6f32c-ba8e-488d-8dde-5071ca46768a"));
var query = vCACCAFEOdataQuery.query().addFilter(filter);
var items = service.getResourcesList(new vCACCAFEPageOdataRequest(query));
The only other way I can think of is directly accessing PostgreSQL database i.e. get all resources that hat requestId of the request.
Any help appreciated.