I can successfully create the resource action, however I am stumped on how to create target criteria. Has anyone done this or have any suggestions on how to do this?
Here is what I have so far (import param in a vCACCAFE:ResourceAction) action:
// only want to be visible when vm status is On or Off
var statusLiteral = new vCACCAFEStringLiteral("Status");
var onLiteral = new vCACCAFEStringLiteral("On");
var offLiteral = new vCACCAFEStringLiteral("Off");
var statusEqualsOn = new vCACCAFEEqualsOperator().evaluate(statusLiteral, onLiteral);
var statusEqualsOff = new vCACCAFEEqualsOperator().evaluate(statusLiteral, offLiteral);
var orClause = new vCACCAFEOrClause([statusEqualsOn, statusEqualsOff]);
action.setTargetCriteria(orClause);
But this throws the following error:
Unable to create object : vCACCAFEEqualsOperator : Class ch.dunes.vso.sdk.DynamicWrapper can not access a member of class com.vmware.vcac.platform.content.operators.EqualsOperator with modifiers "protected"
I tried just as a static method vCACCAFEEqualsOperator.evaluate(... and received this error:
TypeError: Cannot find function evaluate in object DynamicWrapper (Class) : [vCACCAFEEqualsOperator]-[class com.vmware.vcac.platform.content.operators.EqualsOperator] -- VALUE : null. (Workflow:TestUpdateResourceAction / Scriptable task (item1)#4)
I also very skeptical that the statusLiteral will actually do what I want above.
Any help would be greatly appreciated!