A common request I get from customers is how to present only the networks applicable to a reservation in a blueprint form. Before VMware vRealize® Automation™ 7.1, you would create a drop-down list of available networks within a property definition. But this method was a bit static and manual; if a network was added, you needed to update the list manually.
With vRealize Automation 7.1, there is an action in VMware vRealize Orchestrator™ that can present the applicable network in a drop-down list, and this is now more dynamic. If the reservation changes, it will be reflected immediately in the blueprint form.
There are some prerequisites to be able to use vRealize Orchestrator actions in blueprint forms. First, you need to have vRealize Automation and vRealize Orchestrator 7.1 installed. Then you have to configure vRealize Orchestrator as an endpoint in vRealize Automation. To do that, you can follow the instructions given here: http://pubs.vmware.com/vrealize-automation-71/topic/com.vmware.vrealize.automation.doc/GUID-9E9E2393-A268-432C-B9EA-2CBEFA25361B.html. Once that is done, we can use vRealize Orchestrator action to present only applicable networks in our blueprint form.
First, you’ll need to have a reservation with multiple networks available. In my reservation (shown below), I have two networks available: vm and VM Network.
Next, we will have to create a Property Definition. To do that, click on Administration -> Property Dictionary -> Property Definition -> New
Next, we will need to fill out the form for our new Property Definition.
Name: VirtualMachine.Network0.Name [Note that this name is case sensitive and needs to match the name of the custom properties that you will use in the blueprint form.]
Label: NIC 1 Network selection [This is the label that will be presented in the blueprint form; you can put anything you want.]
Visibility: [Do you want these custom properties to be enabled on all your tenants?]
Description: [Best practices suggest that you should include some details about the custom properties here!]
Display Order: [If you want to set some priority on the order, those custom properties will be presented.]
Data Type: String
Required: Yes or No
Display as: DropDown
Values: External Values
Next, click on Select.
Select expan com.vmware.vra.networks, then getApplicableNetworks, and click on OK.
Now you need to modify a blueprint to use your newly created Property Definition. To do this, you will need to click on Design -> Blueprints -> Edit [the blueprint of your choice].
On the Design page, click on your machine, the Network tab, and Edit the network of your machine.
Click on New. Enter the name of your custom properties, and then select Show in Request and click OK two times.
Now let’s try our new drop-down in a VM request. As you can see, we can select between two networks that are available in the reservation.
Now you can duplicate and modify this action in vRealize Orchestrator and account for the location or any other parameters that you want.
I hope this was helpful!
Be social and share.
Pascal joined VMware in 2015 as a Technical Account Manager based in Quebec, Canada. Having 17 years of experience in the IT field, he has worked with VMware products since 2003, and has been focused on VMware-based solutions ever since. In his previous role, he has completed several deployments of vRealize Automation, vCloud Director and vSphere. Pascal currently holds VCAP5-DCD, VCP6-CMA and VCP-DCV certifications.