The PHP script has two components (.inc and .php):
- parameters.inc
- findWorkflows.php
- findWorkflowsWithName.php
At first I create the "parameters.inc" to change the credentials in a central way.
After including the right credentials for the vCO connection I create the findWorkflows.php:
After saving the work the test in the browser shows up all workflows of my vCenter Orchestrator Server.
So the first example is done. The connect works and the first method: "getAllWorkflows" from the vCenter Orchestrator WSDL is running. But in most cases customers want to give data from an external website to the vCenter Orchestrator. I show this with the "getWorflowsWithName" method in another script (findWorkflowsWithName.php).
With this the user can search for a workflow by name.
So, get your feet on the street and start building you own web portal :-)
WARNING - when developing this I found out that the input parameter for "getWorkflowsWithName" isn´t only "name", it is "workflowName"! - WARNING
So, sometimes there are some little traps but we try to fix that!
Can you show how to start a workflow with php?
ReplyDeleteI stuck with the inParameter f.e. at the "Create a virual Machinefolder"-Workflow.
I tried the executeWorkflow and it works, i think, but i cannot pass the input attributes, any ideas on how that is done?
ReplyDelete