VMware Cloud Community
Flex85
Contributor
Contributor

vCO Workflow run from vSphere Web Client cannot select or return type ''SdkConnection"

Hi,

I'm building a workflow for a client of mine to provision Windows and Linux based VMs. The client has two main vCenters they will be provisioning to.

As part of the workflow, the user will select a VM template from the vCO inventory tree structure. I then utilize a method (getVimHostForVimObject) to return the vCenter Server (SdkConnection) that the template has been chosen from. This action is then used to obtain a list of resource pools, VM folders and dvs port groups that belong to that vCenter only. This is done to ensure that the user will not mistakenly select a resource from the wrong vCenter Server.

This mechanism works fine in the presentation form of the Orchestrator client. I start the workflow and then select the VM template that I want to clone. On the next presentation step is the option to select the Resource Pool and VM folder. When I select the Resource Pool variable, it lists only the vCenter Server (SdkConnection) of the VM template I selected.


However the mechanism does not work when the workflow is run from the vSphere Web Client. With the VM template selected, I then proceed to choose the resource pool. However it lists the root of the vCO vCenter inventory tree, listing all vCenter Servers. I then did some testing with a test workflow. I set an input parameter of type 'SdkConnection' and ran it from the web client so that I could select the vCenter Server directly. When the vCenter Server was highlighted in the inventory, I could not select it. This told me that the web client was not recognizing the type SdkConnection. I've attached a screen shot to highlight.

There are also no errors written to the log file.


Please help. Is this expected behavior in the web client? Or is there a better way to automatically select the correct vCenter Server resources when a resource from a specific vCenter has been selected?


FYI: Running vCO 5.5.1 with vCenter Server 5.1 running on both vCenter Servers. I've also got a test environment with both vCO 5.5.2 and vCenter 5.5 and the same issues exist.

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

Hi,

The inability to select objects of type SdkConnection in vSphere Web Client is a known bug in 5.x. It was fixed  a few weeks ago and the fix will be available in vSphere/vCO 6.0 (and probably 5.5U3).

For current 5.1.x and 5.5.x releases you can implement a workaround. Change the input parameter type from 'SdkConnection' to 'string', implement a scripting action that returns an array of strings (string values should be the values of SdkConnections names/urls), and attach this action as predefined values property to input field presentation. Also write another scripting actions that will take the string value selected from the user and will find the actual SdkConnection object with the same name/url.

Hope this helps.

Flex85
Contributor
Contributor

Hi Ilian,

Thanks for your quick response and the information. I've done as you suggested and the actions work in the web client.

Regards.

0 Kudos