VMware Cloud Community
jbweber2
Enthusiast
Enthusiast

vCAC Plugin Batch Entity Update

Is there a peferred method for doing a batch update with the vCAC plugin?

I'm attempting to replace a C# based vCAC extensibility workflow with a vCO workflow, and I don't see any way to perform a batch update.

As an example I'd like to disable performance data collection so we have a scheduled workflow which finds all performance collections which are enabled and then flips the content to disabled and batch saves the rows back. With vCO it looks like I need to do an explicit update per row which isn't really a big deal for this use case, but may be for others with large collections of entities to update it may be.

// example code

var model = "ManagementModelEntities.svc";

var entitySet = "DataCollectionStatuses";

var entities = vCACEntityManager.readModelEntitiesBySystemQuery(

"43bbf1e7-4c4e-473a-b6af-f9ba45bf4252", // host id

model, // model name

entitySet, // entity set

"FilterSpec/FilterSpecGroup/FilterSpecGroupName eq 'performance' and IsDisabled eq false", // filter

null, // order by

null, // select

null, // top

null, // skip

null // headers

)

// update filtered entities here, can I do this as a batch

entities.forEach(function(entity) {

// update one by one

});

0 Kudos
2 Replies
jbweber2
Enthusiast
Enthusiast

After doing more research it appears odata4j which the vcac plugin uses to implement odata access doesn't support batch updates.

The processes we're trying to manage ended up being too complex to try to encode without batch updates and some of the other niceties available in the .NET vcac clients. We've ended up implementing an asp.net webapi app to expose the operations using native libraries and then plugging into that via the rest plugin as a workaround to get access from vco.

0 Kudos
cdecanini_
VMware Employee
VMware Employee

Nice research / work !

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos