Hi,
I am a newbie to vCO and extremely raw with JavaScript (a great combination). My production environment consist of vCenter 5.0, vCD 5.1 and vCO 5.1. I have the vCD plugin installed and working with Orchestrator. I am trying to build a workflow which removes NIC1 (Network adapter 1) from an array of vCloud VMs. I took a copy of the vCloud Director Library Workflow (Remove a NIC) and edited the input parameter vms to be an Array/vCloud:VM. I have amended the scriptable taks so that it loops through the VMs in the array and returns their network cards. It appears that the NICs are being returned as a UID (I returned this to the screen via a System.Log). This UID obviously does not match with what I input to the workflow when executing - I specify "Network adapter 1" and my workflow fails with an error "No primary network connection found; majorErrorCode=400; minorErrorCode=BAD_REQUEST; vendorSpecificErrorCode=null; (Workflow:Remove a NIC 1 / Remove Nic (item0)#22)" Here is the code I am running:
As I mentioned earlier I am a complete newb to vCO\JavaScript and would really appreciate some input\advice. If there is a better method of removing network adapter 1 from an array of vCloud VMs, or if somebody has already developed a workflow for this, I would be most grateful for your help.
Thanks