Every function can be accessed by a URI scheme.
Let's take an example:
VMware Orchestrator should initiate the paap Lifecycle Management after deploying a virtual machine into vSphere. We'll build a vCO action that can start any paap task which works on a virtual machine.
This action prepares the url and its parameters for the task and uses these input parameters:
![]() | ||
| Input parameters |
- object - a reference to the virtual machine object
- paap_cfg_url - the base url of the virtual appliance e.g. https://paap.dom.local/paap/a2c
- paaptask - the name of the task. In our case: lcm/cfgvm This initiates the lifecycle management
The script part of the action:
![]() | |
| execute url script |
<base_url>+'/plugin/'+<task_name>+'/'+<function>
Example:
https://paap.dom.local/paap/a2c/plugin/lcm/cfgvm/run
These parameters are added to the URL object:
- moref - the managed object reference on which the task should work.
- cloneTicket - is used by paap to duplicate the current session. The task will run with the same username and permissions as the vCO workflow.
- serviceUrl - is the sdk url of the virtual Center server
Calling .post on the URL object executes the task.
That's all.
You can watch the progress in the vCenter task list.
| cfgvm progress |


No comments:
Post a Comment