VMware Cloud Community
pizzle85
Expert
Expert
Jump to solution

ASD Pre-Execution vRA Properties in vRO

I'm working on building Veeam as a Service. One thing we would like to do is display a list of vCenter VMs and Folders the business group creating backups can select to add to a backup job when its initially created. My thought was to use the VC:VirtualMachine object type in a tree view and set a data binding for the vCenter folder that matches the value of a custom property of their Business Group. The problem i'm running into is that I don't believe I get any vRA information in vRO about the user pre-execution so i can not do any filtering in the data binding. I would like to use something like __asd_subtenantRef to get the Buisiness Group ID then fetch a custom property that i can perform a vCenter lookup to display the folder that matches the property value and the VMs within the container. Has anyone come up with something clever to work around this issue?

I have gotten around this by creating a Custom Resource in vRA for an object. Perhaps i should do this again a provision a vCenter folder object or something that they can act on...

0 Kudos
36 Replies
pizzle85
Expert
Expert
Jump to solution

yes, you're returning a list of strings just like i am.

0 Kudos
pizzle85
Expert
Expert
Jump to solution

I don't really follow what you're saying. The ASD field im using from my vRO workflow is an array\string. My values action takes input string and provides output array\string. I'm curious to see where you place the input as array\string.

0 Kudos
SeanKohler
Expert
Expert
Jump to solution


Oh... all I am saying is that I thought you wanted to allow a single select for the VM.  Now that I know you want a multi-select, I realize you want an array input into your workflow.  (and not a single string VM)

I am running into the same challenges you are.

The action returns the array, and no matter the input type I choose in the ASD form... it takes the whole array as the selection.  That is obviously not the desired behavior.  You want to have a list of all of them... and the ability to just pick a few that go through as an input into your workflow.

I am trying to work through it....

0 Kudos
SeanKohler
Expert
Expert
Jump to solution


Okay... I got it.

This may not be ideal, but you have to use a dual list.  I cannot get the checkbox list to work. (it is VMware's fault... and I can explain why if they want me to)

Screenshot details of how to setup the dual list to follow.  But it is basically..... use the dual list and set Values to External Values calling your action with your two inputs.

Make sure you always return an array even on a bad input.  (do not return null)

0 Kudos
pizzle85
Expert
Expert
Jump to solution

ahh, that actually makes sense. The return strings are list one and my selected options are list two... Thanks!

0 Kudos
pizzle85
Expert
Expert
Jump to solution

I'm using the exact same procedure with the dual list type and am seeing exactly the same results, a single static list. I'm on 6.2.1 i can try on my prod 6.2.0 setup. i tried creating a different field that grabbed the array of strings then using that for the values list of my dual list but its not listed as an option.

0 Kudos
SeanKohler
Expert
Expert
Jump to solution


Workflow changed to take in an Array of string...  (and syslog the array)

constrainNew1.jpg

Performed an input reload on the request form.  (little blue arrows)

Deleted calculated field that it gave me by default and added it back as a Dual List.  (deletion was probably unnecessary)

constrainNew2.jpg

Selecting the input value changes the list in the left column.

constrainNew3.jpg

Submittal takes right column array of string...

constrainNew4.jpg

SeanKohler
Expert
Expert
Jump to solution


Just validate my screenshots one more time.  Look at all the input types.  Ensure you are calling the values from the right place with the dual list. 

I am on 6.2... so it could be that something is broken in 6.2.1

0 Kudos
pizzle85
Expert
Expert
Jump to solution

that indeed works for me when i create a new simple blueprint using the same action. For whatever reason i havent been able to get it to work in my real workflow... at least i know it can be done! ill keep wokring to see if i can get it working in my real workflow. Thanks for all your help.

0 Kudos
pizzle85
Expert
Expert
Jump to solution

neato! rebuilding the service blueprint apparently wasn't enough, i must have screwed something else up during the testing. I deleted the service blueprint and recreated it using the same vRO workflow and actions and made the changes you provided and its working.

0 Kudos
SeanKohler
Expert
Expert
Jump to solution

Oh that is great news!

Check out this bit of ridiculousness... how the dual list works in practice once you populate dynamically...

I have a list A of ABC... and I grab A & C.

I go to List Z and it keeps my selection and provides me with the new values for List Z.

I select some values from list Z and go back to A.  It presents the full ABC list again.

I select A & C again. (Duplicating the items in the right list)

I go back to list Z and push all the values back INTO the left side... lol. (which will disappear after going to List A and back)

constrainNew5.jpg

I think I might know a way around this behavior, if it were to actually work.  Basically the action would need to take in "self" for the field and then exclude like items in the return.

I might play around with that later...


0 Kudos
SeanKohler
Expert
Expert
Jump to solution


Circular field references are not allowed.  I can understand why...

But that means you cannot send in selected data (right hand side) into the action to strip out array items that are already presented.  (I even tried though a secondary bind to a field.)

I am still looking into a checkbox list as well.

0 Kudos
SeanKohler
Expert
Expert
Jump to solution


So I guess the same thing was happening to me that was happening to you...

I reloaded the ASD form  (with the little blue arrows) and added the checkbox type back as the calculated input.

In both Chrome and IE, the box is kind of squished for the last item... but it does provide a checkbox list.  That might be easier to leverage for you scenario.

The checkboxes behave better because only the items selected on the screen at the time get sent into the workflow on submit.  (So if you select from A, but then move to Z and select some... only Z goes through.)

constrainNew6.jpg

Oh... I should note that I added it to the Values for the Checkbox type.  Not the Constraints.

Message was edited by: SeanKohler

0 Kudos
SeanKohler
Expert
Expert
Jump to solution

So consider this.... I think I might open up a ticket for this one.  The checkbox list eats the last item in the list until 11 items.

This is 4 items...  (where you can start seeing the fourth item getting cut in half)

constrainNew8.jpg

And this is what happens from Items 5-11

constrainNew9.jpg

Number 8 (H) as an example... (= no H... as in not Happy)

constrainNew10.jpg

Here is what happens when it gets to 11.  A NAV BAR... bonus...

constrainNew11.jpg

0 Kudos
pizzle85
Expert
Expert
Jump to solution

I think I would rather use the cheek boxes as long as the user can always see their VMs and it doesn't scale too large for customers with lots of VMs. It looks like the former is an issue in 6.2 ill check 6.2.1 on Monday and it appears the latter is handled when the box reaches a certain size.

It may be helpful to note that during my testing I introduced an issue in the action I was using to do the value lookup. When it errored in the constraints section it returned the vRO error. When it errored in the value section it just returned 400 Bad Request. I took that to mean that what I was trying to do wasn't possible but it was the same error just different return values...

0 Kudos
SeanKohler
Expert
Expert
Jump to solution

Hey... did you get a chance to see if the checkbox list error was still present in 6.2.1?  I am going to put in a ticket to get that issue documented if they didn't fix it already.

It isn't even a dynamic thing... the behavior of the widget is just like that.  I put in predefined values 1 thru 5... and it even makes them disappear in the form before saving it.  I am kind of surprised this didn't get caught in QA.

Setup - All values can be seen due to navbar

mia1.jpg

PreSave Form State

mia2.jpg

Form Request

mia3.jpg

With 11 items... you get a navbar (and it sorts alpha whether you like it or not... heheh)

mia4.jpg

0 Kudos
SeanKohler
Expert
Expert
Jump to solution


Oh... and I have a workaround for dynamic load, just pad your string array with a blank string at the end if there are 5-10 items.

If you have a set predefined list of 5-10 string items, just add a field with a 'zzzzz'.  It is always the last item that is missing.  So feed it one that it can miss.

0 Kudos