VMware Cloud Community
cjoshi
Enthusiast
Enthusiast
Jump to solution

How to read *Instances* in a vRA blueprint request and pass is as an argument to a vRO action

Hello All,

I am trying to write a custom vRO workflow to do_something based on number instances selected. Now the problem is when I try to use the custom property _number_of_instances, this custom property is not passing the selected value in *instances* to the vRO workflow. I guess either _number_of_instances may not be the right property or I might be doing something incorrect.

pastedImage_4.png

I want to use a custom field with a dynamic drop down which would be dependent on the number of *instances* selected.

Any pointers towards a possible solution would be greatly appreciated.

Thanks.

Regards Shekhar

Reply
0 Kudos
1 Solution

Accepted Solutions
eoinbyrne
Expert
Expert
Jump to solution

I'm not 100% sure the property you're using is the right one here.

If I understand what you want to do correctly here, you'd like to create 1-4 VMs of the same type within the same request? If that's the case then you want to do a couple of things

1. Modify the blueprint to permit N instances of the VM like this

pastedImage_0.png

2. The property for the JSON request you want for controlling the count here is this one

pastedImage_1.png

Changing the value of "_cluster" here will request that many clones of the VM defined in the blueprint.

View solution in original post

Reply
0 Kudos
4 Replies
vNerdyNate
Contributor
Contributor
Jump to solution

This is intriguing. What version of vRA? Also, have you looked into custom forms(if possible). Just some thoughts that could help work around this.

Thanks, Nathan
Reply
0 Kudos
cjoshi
Enthusiast
Enthusiast
Jump to solution

Yes, I guess custom forms should work. I have not tested it as I was on vacation. However I prefer not to use custom forms hence the query. 🙂

Thanks.

Regards Shekhar

Reply
0 Kudos
eoinbyrne
Expert
Expert
Jump to solution

I'm not 100% sure the property you're using is the right one here.

If I understand what you want to do correctly here, you'd like to create 1-4 VMs of the same type within the same request? If that's the case then you want to do a couple of things

1. Modify the blueprint to permit N instances of the VM like this

pastedImage_0.png

2. The property for the JSON request you want for controlling the count here is this one

pastedImage_1.png

Changing the value of "_cluster" here will request that many clones of the VM defined in the blueprint.

Reply
0 Kudos
cjoshi
Enthusiast
Enthusiast
Jump to solution

Hi Eoinbyrne,

Thanks for the reply. It worked. 🙂

Regards Shekhar

Reply
0 Kudos