Software supports string, array, content, boolean, integer, and double properties.

Note:

The names of properties are case-sensitive and can contain only alphabetic, numeric, hyphen (-), or underscore (_) characters.

Property Options

You can compute the value of any string property by selecting the computed check box, and you can make any property encrypted, overridable, or required by selecting the appropriate check boxes when you configure Software properties. Combine these options with your values to achieve different purposes. For example, to require blueprint architects to supply a value for a password and encrypt that value, leave the value text box blank, and select Overridable, Required, and Encrypted.

Option

Description

Encrypted

Mark properties as encrypted to mask the value and display as asterisks in vRealize Automation. If you change a property from encrypted to unencrypted, vRealize Automation resets the property value. For security, you must set a new value for the property.

Overridable

Allow architects to edit the value of this property when they are assembling an application blueprint. If you enter a value, it displays as a default.

Required

Require architects to provide a value for this property, or to accept the default value you supply.

Computed

Values for computed properties are assigned by the INSTALL, CONFIGURE, or START life cycle scripts. The assigned value is propagated to the subsequent available life cycle stages and to components that bind to these properties in a blueprint. If select Computed for a property that is not a string property, the property type is changed to string.

If you select the computed property option, leave the value for your custom property blank. Design your scripts for the computed values.

Table 1. Scripting Examples for the Computed Property Option

Sample String Property

Script Sytax

Sample Usage

my_unique_id = ""

Bash - $my_unique_id

export my_unique_id="0123456789"

Windows CMD - %my_unique_id%

set my_unique_id=0123456789

Windows PowerShell - $my_unique_id

$my_unique_id = "0123456789"

String Property

The string property value can be a string or the value bound to another string property. A string value can contain any ASCII characters. For a bound property, use the Properties tab in the blueprint canvas to select the appropriate property for binding. The property value is then passed to the action scripts as raw string data.

Sample String Property

Script Syntax

Sample Usage

admin_email = "admin@email987.com"

Bash - $admin_email

echo $admin_email

Windows CMD - %admin_email%

echo %admin_email%

Windows PowerShell - $admin_email

write-output  $admin_email

Array Property

The array property value can be an array of strings defined as [“value1”, “value2”, “value3”…] or the value bound to another array property. When you define values for an array property you must enclose the array of strings in square brackets. For an array of strings, the value in the array elements can contain any ASCIl characters. To properly encode a backslash character in an Array property value, add an extra backslash, for example, ["c:\\test1\\test2"]. For a bound property, use the Properties tab in the blueprint canvas to select the appropriate property for binding.

For example, consider a load balancer virtual machine that is balancing the load for a cluster of application server virtual machines. In such a case, an array property is defined for the load balancer service and set to the array of IP addresses of the application server virtual machines.

These load balancer service configure scripts use the array property to configure the appropriate load balancing scheme on the Red Hat, Windows, and Ubuntu operating systems.

Sample Array Property

Script Syntax

Sample Usage

operating_systems = ["Red Hat","Windows","Ubuntu"]

Bash - ${operating_systems[@]}

for the entire array of strings

${operating_systems[N]}

for the individual array element

for (( i = 0 ; i < ${#operating_systems[@]}; i++ )); do
   echo ${operating_systems[$i]}
done

Windows CMD - %operating_systems_N%

where N represents the position of the element in the array

for /F "delims== tokens=2" %%A in ('set operating_systems_') do (
    echo %%A
)

Windows PowerShell - $operating_systems

for the entire array of strings

$operating_systems[N]

for the individual array element

foreach ($os in $operating_systems){
   write-output  $os
}

Content Property

The content property value is a URL to a file to download content. Software agent downloads the content from the URL to the virtual machine and passes the location of the local file in the virtual machine to the script.

Content properties must be defined as a valid URL with the HTTP or HTTPS protocol. For example, the JBOSS Application Server Software component in the Dukes Bank sample application specifies a content property cheetah_tgz_url. The artifacts are hosted in the Software appliance and the URL points to that location in the appliance. The Software agent downloads the artifacts from the specified location into the deployed virtual machine.

Sample String Property

Script Syntax

Sample Usage

cheetah_tgz_url = "http://app_content_server_ip:port/artifacts/software/jboss/cheetah-2.4.4.tar.gz"

Bash - $cheetah_tgz_url

tar -zxvf $cheetah_tgz_url

Windows CMD - %cheetah_tgz_url%

start /wait c:\unzip.exe
%cheetah_tgz_url%

Windows PowerShell - $cheetah_tgz_url

 & c:\unzip.exe
$cheetah_tgz_url

Boolean Property

The boolean property type provides True and False choices in the Value drop-down menu.

Integer Property

The integer property type accepts zero, a positive integer, or a negative integer as a value.