{% raw %}

Overview

This overview will help to utilize Property Toolkit mixed with the Sovlabs Template Engine to dynamically build a vRealize Custom Property.

For an example, this guide will go over dynamically generating the value for the VMware.VirtualCenter.Folder property.

 

https://docs.vmware.com/en/vRealize-Automation/7.5/vrealize-automation-75-custom-properties.pdf

 

Property: VMware.VirtualCenter.Folder

Description: Specifies the name of the inventory folder in the data center in which to put the virtual machine. The default is VRM, which is also the vSphere folder in which vRealize Automation places provisioned machines if the property is not used. This value can be a path with multiple folders, for example productionemail servers. A proxy agent creates the specified folder in vSphere if the folder does not exist. Folder names are case-sensitive. This property is available for virtual provisioning.

 

Considerations

This example procedure will apply the set property based off two different custom properties present within the vRA environment. In addition, the properties contained within this guide can be replaced with other static values or built in vRA Custom Properties

Your SovLabs plugin license must include Property Toolkit.  

Requires SovLabs vRA Extensibility modules plugin version 2018.2.7 or higher.

 

Procedure

Determine the variables to be used in the Dynamic Property Group
  1. Log into the vRA environment and determine the properties that are going to be utilized to build the value for VMware.VirtualCenter.Folder
    1. Table of Properties

      Property Value Description

      namingUsage

      DEV Custom Property Used as a selection in the blueprint which is used already for custom naming created for the Sovlabs Naming Sequence to determine the Usage of the server

      namingAppType

      APP Custom Property Used as a selection in the blueprint which is used already for custom naming created for the Sovlabs Naming Sequence to determine the Application Type of the server

  2. As these are properties that are already gathered as part of naming, they are inserted on the blueprint and need to be selected by the end user. These same properties could be set at other layers, such as Business Group, Reservations, or Endpoints and be set with static values

 

Create the Dynamic Property Group
  1. In vRA, create a new Property Group located in Administration>Property Dictionary>Property Group
  2. Name the group, starting with SVL_ , with a unique value
    1. In the below example we created SVL_vCenterFolder (Be sure to include the underscore between SVL and your unique name)

 

Create the Custom Property and Template Engine Code Value inside the New Property Group
  1. Edit the new property group and create a new property
  2. Name the property VMware.VirtualCenter.Folder
  3. For the value field, insert the properties to evaluate to dynamically create the value. The values can be modified and manipulated using the Sovlabs Template Engine
    1. Value: {{namingUsage}}{{namingAppType}}
      1. Code Breakdown

        Code Value Description
        {{namingUsage}} DEV Calls the value set for the namingUsage property
        Verbatim insertion of a between the two properties
        {{namingAppType}} APP Calls the value set for the namingAppType property

      2. The above example would result in a path of DEVAPP

 
Apply the SVL Property Group as a Custom Property
Apply to any layer using a property definition

 The SVL property group MUST be applied as a Custom Property with the value being the same name. This can be assigned on any layer, such as blueprints, reservations, business groups, and endpoints. In this example, we will add it to the Business Group layer 

  1. In vRA, navigate to Administration>Users & Groups>Business Groups
  2. Edit the Business Group and in the Custom properties pane in the General tab click New
  3. Insert a new property that is named the same as the SVL Property Group
  4. Insert the value of the new property to match the name
  5. By adding it to a Business Group layer, it will ensure that this property will be triggered for all builds that are contained within that Business Group

{% endraw %}

Recommended Reading