VMware Cloud Community
Czernobog
Expert
Expert

vRA 6.2 - ASD Form, how to provide a list of VMs belonging to the user calling the workflow?

Hi,

I have created a new Service, that does stuff on a list of vRA provisioned VMs. One of the fields in the service blueprint form has to present the user a list of all VMs (orchestrator type: VCACCAFE:CatalogResource) owned by him and also by all business groups he's a member of (regardless of the role), basically all the VMs the user has access too.

Example: I'm user XYZ, a member of BG A (as a user) and BG B (as a manager). In the request form I should see a list (checklist or dual list) of all the VMs that BG A and BG B owns. Without the validation, I could select any VM from any business group - this input has to be limited to only those I have access too using my rights granted by roles in business groups.

I have tried two approaches:

  •      first was to somehow generate a list using the different constraints and conditions you can set when editing the field of the blueprint form. I tried to make a condition, that only those VMs should be displayed, where the vm's owner name or the vm's organization name would contain the service requesters name. I did not find any combination of conditional clauses, that would accomplish this.
  •      I wrote a vRO workflow, which gets the requesters account name as an input (__asd_requestedBy) and delivers an array of VMs, that the user can access. I wanted to put the list in the form field mentioned above, so the next step would be to create an action out of this workflow and bind it to the form field as an external value. Every time I do this, there is an error when calling the service blueprint form: " Failed to retrieve form from provider". Another problem with this approach is, to somehow provide the requesters user account for the input variable __asd_requestedBy. The blueprint form designer expects to provide a value to this input parameter - I can navigate to the Request Info -> Requested By field, however there is no option to select the account name there. YOu can select E-Mail, First- Last Name and also Principal ID, which I have no idea how to use.

Any ideas how this can be accomplished?

Tags (3)
Reply
0 Kudos
0 Replies