6.2

Table Of Contents
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
}
BeanShell - operating_systems[N]
where N represents the position of the
element in the array
for(index=0;index <
operating_systems.length; index++) {
print(operating_systems[index]);
}
Content Property
The content property value is a URL to a file to download content. Application Services 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,
suppose Hyperic artifacts are hosted in the Application Services appliance and the URL points to that
location in the appliance. The Application Services agent downloads the artifacts from the specified
location into the deployed virtual machine.
Sample String Property Script Syntax Sample Usage
HQ_PACKAGE =
"http://DarwinServerIP/artifacts/services/hyperic/hyperic-
hq-agent-linux.tar.gz"
Bash -
$HQ_PACKAGE
tar -zxvf $HQ_PACKAGE
Windows CMD
- %HQ_PACKAGE
%
start /wait c:\unzip.exe
%HQ_PACKAGE%
Using Application Services
VMware, Inc. 105