6 Replies Latest reply on Jan 13, 2020 11:06 PM by TimDScott

    VM Visibility - vRO / vRA

    TimDScott Novice

      Hi All,


      We've developed a set of workflows that take a VC:VirtualMachine as one of the inputs. This is fine when using the flows within vRO, but we also have a requirement to use them within vRA.


      The workflows have been published as XAAS blueprints within vRA, when a user selects the VC:VirtualMachine they are able to see all of the machines in all the vCenters configured within vRO. We need to limit this to display only the machines they are entitled to see, so for example a user from vRA business group a can select machines a1, a2, a3, a user from business group b can select machines b1, b2, b3.


      We've had a look at the VCAC:VirtualMachine type, but that seems to display all machines as well. Is there a built-in type we can use that will do this, or will we have to "roll our own"?


      Any advice would be appreciated!





        • 1. Re: VM Visibility - vRO / vRA
          stevedrummond Enthusiast

          Have you tried populating the Presentation field Predefined List of Values? I don't know if that works for traditional tree-pick types.


          What I would actually suggest is having the XaaS blueprint be a wrapper for your standard workflows. It's presentation should present the user a dropdown (or multi-picker if array) of machine names as strings. The user selects that and submits the request, where the wrapper workflow logic looks up the VC:VirtualMachine and passes it to your business logic workflow.


          You will use the presentation fields to present the user a list of machine names from within their business group or any other criteria you want. Additionally since you are not using objects your presentation will be exponentially faster and you can even add filter boxes.

          • 2. Re: VM Visibility - vRO / vRA
            TimDScott Novice

            Thanks Steve, that's kind of what I had in mind, I think the main things I am struggling with are:


            • The proper way to detect the tenant/business group of the user that's creating the request.
            • Building a list of machines that are either owned by the user OR sit within the users tenant/business group
            • 3. Re: VM Visibility - vRO / vRA
              stevedrummond Enthusiast

              I quickly put together a workflow/xaas blueprint that should help you get started.


              Unpack the attached ZIP and go into vRO and Import Package from Folder, selecting the folder vmtn.ownerOrBusGroupVMs and clicking Import.


              You will then want to import the XaaS Blueprint xaas_blueprint.json using the vRA API. Alternatively you can make the XaaS blueprint yourself from the workflow, however you will need to make two adjustments (also true if you refresh the form or borrow the logic):


              1. The field businessGroupName must be bound to the field value Request Info -> Business Group -> Name
              2. The field Machines must be a dual list to properly support the filter and remembering existing selections


              Once in the workflow you will obviously need to match up the selected machine names with their VC:VirtualMachine objects to call your existing workflow.


              You can alter the PAGE_SIZE variable in the getVirtualMachineNames action as you see fit for performance. I just remembered you may also want to sort the results by whatever criteria you desire.


              Hope this helps.

              • 4. Re: VM Visibility - vRO / vRA
                TimDScott Novice

                Thanks so much Steve, I'll give it a whirl and let you know how it goes!

                • 5. Re: VM Visibility - vRO / vRA
                  stevedrummond Enthusiast

                  TimDScott did it work for you?

                  • 6. Re: VM Visibility - vRO / vRA
                    TimDScott Novice

                    stevedrummond I've had to switch focus for a while, will get back onto this soon and will let you know, thanks again!