1. I have a basic machine blueprint (win2016 vsphere machine type) defined in my catalog.
2. I have created a custom vRO action that consists of the following javascript code:
var roles = new Array(); roles = System.getModule("com.vmware.o11n.plugin.chef.helpers").getRunlistCandidates(host); System.log(host); System.log(roles); return roles;
It is calling an action supplied by the chef plugin and passing in the chef host, and returns a string array of chef roles, cookbook recipes.
3. I have created a new property definition named roles, defined it as type string, required, drop down, with external values, pointing it to the action, and populating the host value:
Image may be NSFW.
Clik here to view.
When I click select to choose the Script action, a new window pops up and I get the vRO tree populated showing my custom action and the chef plugin helper action successfully. I can choose either or and populate the value of the host without issue.
4. When I request the blueprint, I get the following error once the fields on the request form complete loading:
Unable to start action 'com.caresource.devopstransformation/getRunListCall'. Reason 'Action 'getRunListCall' in module 'com.caresource.devopstransformation' failed : type Cannot be null".
Image may be NSFW.
Clik here to view.
The drop down is empty. All other fields on the request are active and populate successfully.
Troubleshooting:
I can put the very same action in a vRO workflow and when I run it, I choose the host value based on the chef plugin and it completes successfully, printing out the host and the chef roles/run lists/cookbook/recipes in the log.
I can put the chef action my custom action is calling in a workflow and execute it successfully without issue.
I can point the property definition to the chef action, set the host to be the same, and it fails during the request with the same error.
Unable to start action 'com.vmware.o11n.plugin.chef.helpers/getRunlistCandidates'. Reason 'Action 'getRunlistCandidates' in module 'com.vmware.o11n.plugin.chef.helpers' failed : type Cannot be null'.
I can create a XaaS blueprint that executes the workflow that calls both of these actions and it completes fine without any errors.