Hey guys,
I have been searching around for information regarding this question but have had no luck in finding it. I am sure this question has been asked before but i can find no trace. I am currently learning how to use vRO and to automate simple tasks in my environment, so please bare with me.
When executing a workflow you normally get prompted for a form of some kind to fill out the information you asked for throughout the workflow. I have been trying to create 1 form for the various vCenters i maintain as an example cloning a vm and having the ip address inputted during sysprep and join to the domain. In order to do this i was thinking of using a dynamic input, meaning if datacenter A is selected it should now show you the clusters in that datacenter, which after 1 is selected ask what vDS network you would like to choose to place the VM on. I started the process with creating an array of datacenters that are allow to be used, after which based on which one selected a javascript action is called to query that datacenter to grab the clusters. Same process for clusters, with the intent of not caring which host to pick to pull the vDS information since they are in the same cluster. I know i can than query the host it auto selects for the vDS information, but here is where i struggle. I am no javascript wiz and my attempt to call all the queries at once haven't been successful so i am having to create a new action for each query due to this lack of knowledge. This process i am trying to create is much easier under powercli as i know how to get the information and work with what i get, there is a lot better support vs javascript and vRO from what i can find. The one thing i cant seem to find any information on is how to setup a dynamic input using powercli.
When the form appears and asks for a question you normally have the presentation section call an action against a variable to get the array of information to select. How do you call a powercli script to start this action while returning an array of what you need? I believe that you may be able to get this to work if you attach an external script workflow after you query the other objects but make the data available via a paused user input once the main workflow starts to ask for your information once its able to query that information. Because the form seems to start before the workflow actually starts i haven't been able to see something to get the script to execute first, which is what i want vs having a paused moment to ask more questions.
I am sure my thinking is very flaw on this, so i am asking for help correcting this thinking. If there is a good book i should read about using powercli with vRO i would be glad to read it, if it helps figure out my issue or a blog or a forum question.
Any suggestion in understanding this would be grateful!
Thank you!