Hi All,
I am trying to create a property definition using the method createPropertyDefinition(). The property definition will be populated by an external action and there is a parameter externalAction with type Action in the method.
Does anyone know the format it expects for the parameter externalAction
I tried giving it the way we see in my property definition, com.vratest.utils/getStorageList
It fails in reading externalAction.module.name from it. I am sure its a small mistake or a particular way it expects the input value to be passed
Appreciate your time and help.
Thanks!
This is what I understood. When I search for actions, I see the below list.
Here for all the items in the result the Type is Action but even though my action getStorageList exists. It doesn't have a Type coming on its own and that's why its not listed here.
There is no way we define the type while adding an action to the Folder\Module. We just click on add action and it asks to just enter the name.
Can someone please suggest.
Thanks!
I had to do this to pass the exact Action object. But this is very expensive as it will iterate over all the actions from all modules.
var externalAction = "";
var allActions = System.getModule("com.vmware.library.action").getAllActions();
for(var i=0; i<allActions .length; i++){
if(allActions [i].name == "getStorageList "){
externalAction = allActions [i];
System.log(allActions [i].name);
break;
}
}
ishaarora3, would this help?
actionResult = System.getModule("com.vmware.library.action").getStorage();
sorry typo in the previous reply
actionResult = System.getModule("com.vmware.library.action").getStorageList();